Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Commands executed in connection with timers



Klaus.Schmidinger@cadsoft.de(Klaus Schmidinger)  17.09.01 23:33

Once upon a time Klaus Schmidinger shaped the electrons to say...

>> But what's with VDR?
>>
>> The elegant solution would be a "w"+"awk" in the power down script
>> and see if anyone is logged on and how long he is idle.
>>
>> Does VDR accept/survive/check a return from power down script
>> and retrigger the "User idle"?

>I'm afraid I have no idea what you are talking about.
>What does a system shutdown have to do with VDR calling the
>"shutdown" script? VDR calls its shutdown script when _it_
>wants to shutdown the system. 

Yes.

>If, for whatever reason, somebody
>else shuts down the system, 
>he will have to boot it up again by himself.

Of cause.  (That's an other point why one "wishes" 
to turn off the PC only via VDR: That the wake-up timer 
will be set. But this was not my question.)

I was only talking about the power down script VDR calls,
no other scripts.
VDR can't prevent nobody from pressing the poweroff key,
but VDR might be prevented pressing "the key",
because the user activity is now on the keyboard, not the RC.
VDR can't check this(of cause). But the special 
power down script VDR calls may be able to check.


VDR decides: 
No events in the next 8h, No remote control keys since one hour:
So: VDR calls the powerdown script.
Curently this script just do 
"halt -p" or "powerdown" or "shutdown now".
This causes the broadcast message to be sent, 
that the system shut's down now.

Sometimes sombody may be logged on and is
working on something on the linux box.

Just after editting 1h in vi (without "write" :-))
it's not nice to be interrupted by a power down
initiated by VDR.
VDR can't know what else is on the PC.

So the idea was to extend the powerdown script VDR calls.
That script should check if VDR is allowed to shut down
now. For example by doing a "who is longed on now".
If some one is working (has no "idle" time) the power down script
should of cause not shut down now, and it makes sense
that VDR stays running (Who knows how long the user will
continue to type...;-) And how the wake-up time will be set...)...

---

What is the state of VDR when calling poweroff
and poweroff simply returns?

Did VDR already clean up everyting when calling the pwd-script?
(So the script has to restart VDR immediately)
Or will it clean up and terminate VDR if the powerscript
just returns?
But there must be a way to prevent VDR calling the powerscript 
in a loop.




Home | Main Index | Thread Index