Created
June 10, 2014 14:56
-
-
Save npcardoso/47d8f45505ccbdb52581 to your computer and use it in GitHub Desktop.
A script to enable/disable all acpi wakeup events
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/bash | |
if [[ $# > 1 || ($1 != "enable" && $1 != "disable") ]]; then | |
echo "Usage: $0 <enable|disable>" | |
exit 1 | |
fi | |
if [[ $1 == "enable" ]]; then | |
TOGGLE=`grep '\*disabled' /proc/acpi/wakeup | cut -d ' ' -f1` | |
else | |
TOGGLE=`grep '\*enabled' /proc/acpi/wakeup | cut -d ' ' -f1` | |
fi | |
for DEV in $TOGGLE; do | |
echo $DEV | |
echo $DEV > /proc/acpi/wakeup | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment