diff options
-rwxr-xr-x | pm/sleep.d/00clear | 2 | ||||
-rwxr-xr-x | pm/sleep.d/00logging | 2 | ||||
-rwxr-xr-x | pm/sleep.d/05led | 2 | ||||
-rwxr-xr-x | pm/sleep.d/10NetworkManager | 2 | ||||
-rwxr-xr-x | pm/sleep.d/49bluetooth | 2 | ||||
-rwxr-xr-x | pm/sleep.d/50modules | 2 | ||||
-rwxr-xr-x | pm/sleep.d/65alsa | 2 | ||||
-rwxr-xr-x | pm/sleep.d/90clock | 2 | ||||
-rwxr-xr-x | pm/sleep.d/94cpufreq | 2 | ||||
-rwxr-xr-x | pm/sleep.d/99video | 2 | ||||
-rw-r--r-- | src/pm-action.in | 16 |
11 files changed, 18 insertions, 18 deletions
diff --git a/pm/sleep.d/00clear b/pm/sleep.d/00clear index 217d8db..a5cd02b 100755 --- a/pm/sleep.d/00clear +++ b/pm/sleep.d/00clear @@ -3,7 +3,7 @@ . "${PM_FUNCTIONS}" case "$1" in - hibernate|suspend*) + hibernate|suspend) fgconsole |savestate console chvt 63 TERM=linux clear diff --git a/pm/sleep.d/00logging b/pm/sleep.d/00logging index fd2a9a8..7990a50 100755 --- a/pm/sleep.d/00logging +++ b/pm/sleep.d/00logging @@ -3,7 +3,7 @@ . "${PM_FUNCTIONS}" case "$1" in - hibernate|suspend*) + hibernate|suspend) [ -n "$PM_LOGFILE" ] || exit 0 /bin/uname -a lsmod diff --git a/pm/sleep.d/05led b/pm/sleep.d/05led index c7263fd..84bef1b 100755 --- a/pm/sleep.d/05led +++ b/pm/sleep.d/05led @@ -3,7 +3,7 @@ [ -f /proc/acpi/ibm/led ] || exit $NA case "$1" in - hibernate|suspend*) + hibernate|suspend) echo "7 blink" >/proc/acpi/ibm/led ;; thaw|resume) diff --git a/pm/sleep.d/10NetworkManager b/pm/sleep.d/10NetworkManager index bcb5e5d..8538d6b 100755 --- a/pm/sleep.d/10NetworkManager +++ b/pm/sleep.d/10NetworkManager @@ -23,7 +23,7 @@ resume_nm() } case "$1" in - hibernate|suspend*) + hibernate|suspend) suspend_nm ;; thaw|resume) diff --git a/pm/sleep.d/49bluetooth b/pm/sleep.d/49bluetooth index e4977c4..5fcb04c 100755 --- a/pm/sleep.d/49bluetooth +++ b/pm/sleep.d/49bluetooth @@ -23,7 +23,7 @@ resume_bluetooth() } case "$1" in - hibernate|suspend*) + hibernate|suspend) suspend_bluetooth ;; thaw|resume) diff --git a/pm/sleep.d/50modules b/pm/sleep.d/50modules index 5d8c5da..338529b 100755 --- a/pm/sleep.d/50modules +++ b/pm/sleep.d/50modules @@ -17,7 +17,7 @@ resume_modules() } case "$1" in - hibernate|suspend*) + hibernate|suspend) suspend_modules ;; thaw|resume) diff --git a/pm/sleep.d/65alsa b/pm/sleep.d/65alsa index bfe76be..5fc729e 100755 --- a/pm/sleep.d/65alsa +++ b/pm/sleep.d/65alsa @@ -5,7 +5,7 @@ command_exists alsactl || exit $NA case "$1" in - hibernate|suspend*) + hibernate|suspend) alsactl store 0 >/dev/null 2>&1 ;; thaw|resume) diff --git a/pm/sleep.d/90clock b/pm/sleep.d/90clock index b000457..f69c8c9 100755 --- a/pm/sleep.d/90clock +++ b/pm/sleep.d/90clock @@ -25,7 +25,7 @@ resume_clock() } case "$1" in - hibernate|suspend*) + hibernate|suspend) suspend_clock ;; thaw|resume) diff --git a/pm/sleep.d/94cpufreq b/pm/sleep.d/94cpufreq index cfb0c60..d956aa1 100755 --- a/pm/sleep.d/94cpufreq +++ b/pm/sleep.d/94cpufreq @@ -33,7 +33,7 @@ thaw_cpufreq() } case "$1" in - suspend*|hibernate) + suspend|hibernate) hibernate_cpufreq ;; resume|thaw) diff --git a/pm/sleep.d/99video b/pm/sleep.d/99video index c20c7fa..690a4dd 100755 --- a/pm/sleep.d/99video +++ b/pm/sleep.d/99video @@ -130,7 +130,7 @@ help() { } case "$1" in - suspend*) suspend_video ;; + suspend) suspend_video ;; hibernate) if [ "$HIBERNATE_RESUME_POST_VIDEO" = "yes" ]; then suspend_video diff --git a/src/pm-action.in b/src/pm-action.in index c9069ab..b11ef22 100644 --- a/src/pm-action.in +++ b/src/pm-action.in @@ -55,17 +55,17 @@ do shift done -ACTION="$(echo ${0##*pm-} |tr - _)" +METHOD="$(echo ${0##*pm-} |tr - _)" -case "$ACTION" in - suspend) REVERSE=resume ;; - hibernate) REVERSE=thaw ;; - suspend_hybrid) REVERSE=resume ;; - *) echo "Don't know how to ${ACTION}." +"check_$METHOD" || { echo "System does not support $METHOD sleep."; exit 1; } + +case "$METHOD" in + suspend*) ACTION=suspend; REVERSE=resume ;; + hibernate) ACTION=hibernate; REVERSE=thaw ;; + *) echo "Don't know how to ${METHOD}." exit 1 ;; esac -"check_$ACTION" || { echo "System does not support $ACTION sleep."; exit 1; } init_logfile "${PM_LOGFILE}" log "Initial commandline parameters: $PM_CMDLINE" load_hook_blacklist @@ -78,7 +78,7 @@ rm -f "${INHIBIT}" run_hooks sleep "$ACTION" # Sleep only if we know how and if a hook did not inhibit us. -command_exists "do_$ACTION" && [ ! -e "$INHIBIT" ] && { sync; "do_$ACTION"; } +command_exists "do_$METHOD" && [ ! -e "$INHIBIT" ] && { sync; "do_$METHOD"; } # run the sleep hooks in reverse with the wakeup action run_hooks sleep "$REVERSE" reverse |