summaryrefslogtreecommitdiff
path: root/pm/sleep.d/00auto-quirk
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2008-09-10 22:04:04 -0500
committerVictor Lowther <victor.lowther@gmail.com>2008-09-10 22:04:04 -0500
commit285ed3d355956513ecb8509ef931860221aadd25 (patch)
treeacafb4e05045d8a97dc6c3606427cbcbecb0a479 /pm/sleep.d/00auto-quirk
parentabcd57e9730613bf08d75498fa348266a93f49b0 (diff)
Make 00auto-quirk fail gracefully if HAL is not there.
Diffstat (limited to 'pm/sleep.d/00auto-quirk')
-rwxr-xr-xpm/sleep.d/00auto-quirk9
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 ;;