On Sat, Jul 14, 2007 at 12:48:19AM +0200, Udo Richter wrote:
I don't really understand that. On boot, you start VDR, kill it and restart it?
Yes and no :-) My vdrwatchdog just take care that vdr is up and respond, if it's not, then it kill it and reload the driver and restart it.
Now I have found out that in in gentoo initscript I forgot to tell the vdrwatchdog initscript to be run AFTER vdr, which was of course stupid from me... since I don't have any FF cards anymore in my system, the reload of the driver at boot don't seems needed anymore anyway.
The next scheduled wakeup time is always MinEventTimeout in the future, to prevent wakeup race conditions and immediate restarts on forced shutdown. Thats probably what causes VDR to assume manual start on second run. However this only happens together with calling the shutdown script, and the shutdown script should not be called at all, since there's a timer close by...?
To avoid this, you could save the NextWakeupTime and restore it after VDR exits.
Yes, I have added a test for an enough uptime in my vdr's "checkscrip" which is the easy way to be sure my computer don't power down too early.
Thank for your kindness answer and have a great day,