diff options
author | Victor Lowther <victor.lowther@gmail.com> | 2008-10-05 10:55:48 -0500 |
---|---|---|
committer | Victor Lowther <victor.lowther@gmail.com> | 2008-10-05 10:55:48 -0500 |
commit | baa95d0f6f5fac987c85303f158accf17bcdbd8c (patch) | |
tree | 56b5d99fb8f17c1853303588308e9e889ec9a1e2 | |
parent | d156e9312ea5c2fecb3d9ada08c3746012361550 (diff) | |
parent | f90faf9293b1dddba7fe6da2a22398e8b84e51cc (diff) |
Merge branch 'master' into pm-utils-1.2
-rw-r--r-- | pm/functions.in | 2 | ||||
-rwxr-xr-x | pm/module.d/tuxonice | 4 | ||||
-rwxr-xr-x | pm/module.d/uswsusp | 12 | ||||
-rw-r--r-- | pm/pm-functions.in | 4 | ||||
-rwxr-xr-x | pm/sleep.d/00auto-quirk | 4 |
5 files changed, 13 insertions, 13 deletions
diff --git a/pm/functions.in b/pm/functions.in index 2af9429..110282e 100644 --- a/pm/functions.in +++ b/pm/functions.in @@ -235,7 +235,7 @@ get_parameters() { # check to see if a single parameter exists has_parameter() { - for p in $PARAMETERS; do + for p in $(get_parameters); do [ "$p" = "$1" ] && return 0 done return 1 diff --git a/pm/module.d/tuxonice b/pm/module.d/tuxonice index f4e3de9..3db8cbe 100755 --- a/pm/module.d/tuxonice +++ b/pm/module.d/tuxonice @@ -13,7 +13,7 @@ done if [ -z "$HIBERNATE_MODULE" -a -n "$TUXONICE_LOC" ] && \ [ -f "${TUXONICE_LOC}/do_hibernate" ]; then - HIBERNATE_METHOD="tuxonice" + HIBERNATE_MODULE="tuxonice" do_hibernate() { echo 5 > "${TUXONICE_LOC}/powerdown_method" @@ -24,7 +24,7 @@ fi if [ -z "$SUSPEND_HYBRID_MODULE" -a -n "$TUXONICE_LOC" ] && \ grep -q mem /sys/power/state && \ [ -f "${TUXONICE_LOC}/do_hibernate" ]; then - SUSPEND_HYBRID_METHOD="tuxonice" + SUSPEND_HYBRID_MODULE="tuxonice" do_suspend_hybrid() { echo 3 >"${TUXONICE_LOC}/powerdown_method" diff --git a/pm/module.d/uswsusp b/pm/module.d/uswsusp index 1bb1e68..9da30c9 100755 --- a/pm/module.d/uswsusp +++ b/pm/module.d/uswsusp @@ -52,10 +52,10 @@ uswsusp_help() echo " --quirk-none" } -if [ -z "$SUSPEND_METHOD" ] && command_exists s2ram && \ +if [ -z "$SUSPEND_MODULE" ] && command_exists s2ram && \ ( grep -q mem /sys/power/state || \ ( [ -c /dev/pmu ] && pm-pmu --check; ); ); then - SUSPEND_METHOD="uswsusp" + SUSPEND_MODULE="uswsusp" do_suspend() { uswsusp_get_quirks @@ -67,23 +67,23 @@ if [ -z "$SUSPEND_METHOD" ] && command_exists s2ram && \ fi fi -if [ -z "$HIBERNATE_METHOD" ] && \ +if [ -z "$HIBERNATE_MODULE" ] && \ [ -f /sys/power/disk ] && \ grep -q disk /sys/power/state && \ [ -c /dev/snapshot ] && command_exists s2disk; then - HIBERNATE_METHOD="uswsusp" + HIBERNATE_MODULE="uswsusp" do_hibernate() { s2disk } fi -if [ -z "$SUSPEND_HYBRID_METHOD" ] && +if [ -z "$SUSPEND_HYBRID_MODULE" ] && grep -q mem /sys/power/state && \ command_exists s2both && \ check_hibernate; then - SUSPEND_HYBRID_METHOD="uswsusp" + SUSPEND_HYBRID_MODULE="uswsusp" do_suspend_hybrid() { uswsusp_get_quirks diff --git a/pm/pm-functions.in b/pm/pm-functions.in index dfbbc9f..f5cc400 100644 --- a/pm/pm-functions.in +++ b/pm/pm-functions.in @@ -79,8 +79,8 @@ done . "${PM_FUNCTIONS}" -if [ "$(id -u)" = "0" ] && command_exists dmidecode; then - export CHASSIS_TYPE="$(dmidecode -s chassis-type)" +if [ "$(id -u)" = "0" ] && command_exists hal-get-property; then + export CHASSIS_TYPE="$(hal-get-property --udi /org/freedesktop/Hal/devices/computer --key system.chassis.type)" else export CHASSIS_TYPE=Unknown fi diff --git a/pm/sleep.d/00auto-quirk b/pm/sleep.d/00auto-quirk index 0781411..0f9bcce 100755 --- a/pm/sleep.d/00auto-quirk +++ b/pm/sleep.d/00auto-quirk @@ -20,7 +20,7 @@ do_save_quirks() video_vendor=$($hgp system.hardware.primary_video.vendor --hex) video_card=$($hgp system.hardware.primary_video.product --hex) ( - exec >"/tmp/pm-utils-created.fdi" + exec >"/etc/hal/fdi/information/99local-pm-utils-quirks.fdi" echo '<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->' echo '<!-- Created by pm-utils -->' echo '<deviceinfo version="0.2">' @@ -43,7 +43,7 @@ do_save_quirks() echo " </device>" echo "</deviceinfo>" ) - echo "FDI file created as /tmp/pm-utils-created.fdi" + echo "FDI file created as /etc/hal/fdi/information/99local-pm-utils-quirks.fdi" } maybe_add_quirks() |