Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: VDR wakeup (special solution)
Sergei Haller schrieb:
On Sun, 23 Feb 2003, Andreas Böttger wrote:
> If VDR decides to shutdown, all sessions of "normal" users are killed.
just change vdrshutdown to look, if someone is logged in. (you may use
< snip >
my who-based test fails sometimes, it gives me users without running
processes (after closing KDE...). Now I'm using ps after who...
Thanks for the hint to use 'cut' :)
# are there logins?
# (the output of who maybe wrong, logins without processes... :)
WHO_USERS=`who | cut -d' ' -f1 | sort -u`
PS_USERS=`ps -Ao user | sort -u | grep -v USER`
for user in $WHO_USERS
if test `echo $PS_USERS | grep $user | wc -w` -gt 0
COUNT=`echo $USERS | wc -w`
if test $COUNT -gt 0
echo "there are active users:$USERS" >> $LOGFILE
echo "shutdown (halt -p)" >> $LOGFILE
> If a user shuts down the pc, VDR will never wake up again.
for this one just create a script which sends one SVDRP command to vdr:
< snip >
This way no running recording is broken, the time for the next recording
is set in the bios and you don't have to modify the vdr source.
Ok, that is an alternative. A good one, because of running recordings...
But maybe I feel better to have always a correct wakeup timer in BIOS?
I could mix both... (just thinking)
PS.: on my vdr machine I'm using ACPI. If I press the power butten of the
case, the script is called, which sends "hitk power" via SVDRP to vdr.
This way I just tell vdr: "you can shutdown if you like" the rest is done
by vdr (and the vdrshutdown script)
That's a very smart idea! This way the power button would be kids-safe ;)
Hmm, using ACPI and one of your reboot solutions to power off my A7V133
Thank you again,
...looking for time ;)
To unsubscribe send a mail to email@example.com with "unsubscribe vdr" as subject.
Main Index |