Hi,
I have a large video-partition (1 TB) and would like to schedule a fsck on these partition during the shutdown of vdr once a week but only if there is enough time (let's say 1 Hour) until the next timer will be executed via nvram-wakeup. The shutdown-script seems to be problematic because vdr is still running and i will not be able to unmount the partition. During startup is always a problem, because there might be a timer waiting.
Is anybody willing to give me a hint how to solve this situation ? Perhaps someone allready solved this problem.
Thank you
/hgm.bg
On Thu, 2006-02-16 at 19:19 +0100, ... wrote:
Hi,
I have a large video-partition (1 TB) and would like to schedule a fsck on these partition during the shutdown of vdr once a week but only if there is enough time (let's say 1 Hour) until the next timer will be executed via nvram-wakeup. The shutdown-script seems to be problematic because vdr is still running and i will not be able to unmount the partition. During startup is always a problem, because there might be a timer waiting.
Is anybody willing to give me a hint how to solve this situation ? Perhaps someone allready solved this problem.
Maybe you could remove the actual shutdown command from the shutdown script, spawn a background process from your shutdown script which kills vdr, sleeps for a few seconds (or have a loop watching for any vdr processes), unmounts the partitions and fscks it, and then does the actual shutdown.
Obviously, you'd have to work in the 'once a week' bit, and checking whether there is at least an hour until the next wakeup time.
Nice plan, though: I get annoyed when my vdr box starts doing a long fsck every 30 boots, or whatever and I have to wait for that before I can watch TV! Doing it at shutdown every so often would be much more productive!
:)
Cheers,
Laz
vdr-bounces@linuxtv.org wrote:
I have a large video-partition (1 TB) and would like to schedule a fsck on these partition during the shutdown of vdr once a week but only if there is enough time (let's say 1 Hour) until the next timer will be executed via nvram-wakeup. The shutdown-script seems to be problematic because vdr is still running and i will not be able to unmount the partition. During startup is always a problem, because there might be a timer waiting.
Maybe you could remove the actual shutdown command from the shutdown script, spawn a background process from your shutdown script which kills vdr, sleeps for a few seconds (or have a loop watching for any vdr processes), unmounts the partitions and fscks it, and then does the actual shutdown.
That's what I'm looking for, i hoped someone allready invented the wheel :)
Obviously, you'd have to work in the 'once a week' bit, and checking whether there is at least an hour until the next wakeup time.
The second parameter of the shutdown call of vdr is the amount of seconds until next timer, so the time to the next timer event is known and to find the day of the week shouldn't be that difficult :)
Nice plan, though: I get annoyed when my vdr box starts doing a long fsck every 30 boots, or whatever and I have to wait for that before I can watch TV! Doing it at shutdown every so often would be much more productive!
So let's find a nice shutdown script which does the job....
Laz
/hgm.bg