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 >
Hello Sergei,
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`
USERS=""
for user in $WHO_USERS
do
if test `echo $PS_USERS | grep $user | wc -w` -gt 0
then
USERS="$USERS $user"
fi
done
COUNT=`echo $USERS | wc -w`
# shutdown?
if test $COUNT -gt 0
then
echo "there are active users:$USERS" >> $LOGFILE
else
echo "shutdown (halt -p)" >> $LOGFILE
halt -p
fi
> 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:
hitk power
< 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
by APM...
Thank you again,
Andreas Böttger
...looking for time ;)
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index