Files
Arch-R/packages/sysutils/lirc/scripts/lircd_wakeup_enable
Stephan Raue 3cc381c2da lirc: move out of remote
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2014-08-14 06:32:52 +02:00

18 lines
566 B
Bash
Executable File

#!/bin/sh
################################################################################
# wakeup_enable
################################################################################
devpath=`readlink -f "/sys/${DEVPATH}"`
while echo "${devpath}" | grep -q '^/sys/devices/' > /dev/null 2>&1 ; do
if test -e "${devpath}/power/wakeup" ; then
state=`cat "${devpath}/power/wakeup"`
if test "x${state}" = "xdisabled" ; then
echo "enabled" > "${devpath}/power/wakeup"
fi
fi
devpath=`dirname "${devpath}"`
done
exit 0