Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: Switching off
At Mittwoch, 3. September 2003 22:49 Rene Bartsch wrote:
> Sergei Haller schrieb:
> > I don't think there is actually a menu option. but you can define a
> > power button on your remote control. If you don't have enough
> > buttons, you can put a command sending "HITK Power" to VDR in the
> > commands menu.
>
> Just use ACPI. Which distro do you use?
> You have to enable ACPI with kernel-option "acpi=on" and acpid must run.
> Additionally you have to set files with rules how to handle ACPI-events
> in /etc/acpi/.
>
> Most distros install it ready for use (Mandrake: "urpmi acpi*" and
> you're ready).
I like to keep it simple, since I am using my mini-netroot (distro-less),
and since I don't need acpid and stuff, I just used a bash-based
mini-daemon (I've inserted it as a demonstration). It runs out of the box
using only tools busybox provides.
#!/bin/sh
while [ 1 ] ; do
read EVENT </proc/acpi/event
if [ "`echo $EVENT | sed 's/[0-9 ]*$//'`" = "button power" ] ; then
/sbin/poweroff
fi
done
Greetings,
Sascha
--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index