diff options
Diffstat (limited to 'pm')
-rwxr-xr-x | pm/sleep.d/00auto-quirk | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pm/sleep.d/00auto-quirk b/pm/sleep.d/00auto-quirk index 7ac304c..b92aca4 100755 --- a/pm/sleep.d/00auto-quirk +++ b/pm/sleep.d/00auto-quirk @@ -46,12 +46,17 @@ do_save_quirks() echo "FDI file created as /tmp/pm-utils=created.fdi" } -mabye_add_quirks() +maybe_add_quirks() { [ -z "$PM_CMDLINE" ] && { + command_exists lshal || return $NA do_add_quirks return 0 } + command_exists lshal || { + echo "--auto-quirks requires HAL. Aborting" + return 1 + } has_parameter --auto-quirks || return 0 do_add_quirks remove_parameters --auto-quirks @@ -75,7 +80,7 @@ help() } case $1 in - suspend|hibernate) mabye_add_quirks ;; + suspend|hibernate) maybe_add_quirks ;; thaw|resume) maybe_save_quirks ;; help) help ;; *) exit $NA ;; |