Friedhelm Büscher schrieb:
>
> let me guess: it gets a timeout? VDR is busy waiting for the shutdownscript 
> to return, so
> no new svdr-connection is accepted. Spawn the svdrpsend (with at, if you 
> like) and your
> problems will vanish.
>
>   
Sorry, but you guessed wrong ;)
Like written before I was mislead by my own assumptions about the order 
in which the "maybe"-shutdown-sequence is handled.

I guessed that
a) the shutdown abort by keypress message is displayed
b) the shutdown-hooks are called
c) after b) finishes with exit 0 the timeout from a) is waited for and 
only than a shutdown happens

And even this order is somehow strange, as it displays an annoying 
message that might not even be needed.

But atm it seems like the order is:
a) the shutdown abort by keypress message is displayed
b) the timeout of 5! minutes is waited for
c) after that timeout passes the shutdown-hooks are checked

I just changed my S90.custom shutdownhook to just "exit 1" and set the 
idletimeout to 1 minute und my log shows:
Jul 16 17:05:45 video vdr: [4146] confirm: Taste drücken, um Ausschalten 
abzubrechen
Jul 16 17:05:45 video vdr: [4146] warning: Taste drücken, um Ausschalten 
abzubrechen
...
Jul 16 17:10:46 video vdr: [4146] confirmed
Jul 16 17:10:46 video vdr-shutdown: executing 
/usr/share/vdr/shutdown-hooks/S50.noad as shell script
Jul 16 17:10:46 video vdr-shutdown: executing 
/usr/share/vdr/shutdown-hooks/S50.vdrconvert as shell script
Jul 16 17:10:47 video vdr-shutdown: executing 
/usr/share/vdr/shutdown-hooks/S90.custom as shell script
Jul 16 17:10:47 video vdr-shutdown: Shutdown aborted by 
/usr/share/vdr/shutdown-hooks/S90.custom with exitcode 1
Jul 16 17:10:50 video vdr: [4146] connect from 127.0.0.1, port 45439 - 
accepted
Jul 16 17:10:50 video vdr: [4146] SVDRP message: 'Shutdown abgebrochen / 
Shutdown aborted!'
Jul 16 17:10:50 video vdr: [4146] info: Shutdown abgebrochen / Shutdown 
aborted!
Jul 16 17:10:50 video vdr: [4146] closing SVDRP connection


Which leads to the question:
Why is this done in this order and not like this:

a) check the shutdown-hooks and if those exit with exitcode=0 do b) else 
abort the shutdown sequence without a message (exception: the script 
wants to be verbose and does it itself)
b) display shutdown abort message
c) wait for the timeout and shutdown if it happens


Regards,
Norbert

_______________________________________________
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

Reply via email to