Created
November 4, 2012 14:58
-
-
Save nmunson/4012196 to your computer and use it in GitHub Desktop.
XBMC box rc.local file for waking from suspend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
# | |
# rc.local | |
# | |
# This script is executed at the end of each multiuser runlevel. | |
# Make sure that the script will "exit 0" on success or any other | |
# value on error. | |
# | |
# In order to enable or disable this script just change the execution | |
# bits. | |
# | |
# By default this script does nothing. | |
status=`cat /proc/acpi/wakeup | grep "USB0" | awk {'print $3}'` | |
if [ "$status" = "disabled" -o "$status" = "*disabled" ]; then | |
echo "USB0" > /proc/acpi/wakeup | |
fi | |
status=`cat /proc/acpi/wakeup | grep "USB2" | awk {'print $3}'` | |
if [ "$status" = "disabled" -o "$status" = "*disabled" ]; then | |
echo "USB2" > /proc/acpi/wakeup | |
fi | |
sudo sh -c "echo enabled> /sys/bus/usb/devices/2-6/power/wakeup" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment