hal: Branch 'master'

Richard Hughes hughsient at kemper.freedesktop.org
Tue Jul 17 06:13:40 PDT 2007


 tools/linux/hal-system-power-set-power-save-linux |   35 +++++-----------------
 1 files changed, 8 insertions(+), 27 deletions(-)

New commits:
diff-tree d6c277cfb680e08c2b0689e103c5597c749df001 (from 7ae50f83021c13ba7ed7f75dc6334f176e76962e)
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Jul 17 14:10:02 2007 +0100

    we only support pm-utils for SetLowPowerMode
    
    Remove the per-distro checks for the setlowpowermode scripts
    this should all be done in the cross distro pm-utils.

diff --git a/tools/linux/hal-system-power-set-power-save-linux b/tools/linux/hal-system-power-set-power-save-linux
index c0a78b9..38fccaa 100755
--- a/tools/linux/hal-system-power-set-power-save-linux
+++ b/tools/linux/hal-system-power-set-power-save-linux
@@ -8,33 +8,14 @@ unsupported() {
 	exit 1
 }
 
-#ALTLinux only supports powersave
-if [ -f /etc/altlinux-release ] ; then
-	if [ -x "/usr/bin/powersave" ] ; then
-		if [ $value = "true" ]; then
-			/usr/bin/powersave -e Powersave
-			RET=$?
-		elif [ $value = "false" ]; then
-			/usr/bin/powersave -e Performance
-			RET=$?
-		fi
-	else
-		unsupported
-	fi
-
-#RedHat/Fedora and SUSE support pm-utils
-elif [ -f /etc/redhat-release ] || [ -f /etc/fedora-release ] \
-		|| [ -f /etc/SuSE-release ] ; then
-	if [ -x "/usr/sbin/pm-powersave" ] ; then
-		if [ $value = "true" ]; then
-			/usr/sbin/pm-powersave true
-			RET=$?
-		elif [ $value = "false" ]; then
-			/usr/sbin/pm-powersave false
-			RET=$?
-		fi
-	else
-		unsupported
+# We only support pm-utils
+if [ -x "/usr/sbin/pm-powersave" ] ; then
+	if [ $value = "true" ]; then
+		/usr/sbin/pm-powersave true
+		RET=$?
+	elif [ $value = "false" ]; then
+		/usr/sbin/pm-powersave false
+		RET=$?
 	fi
 
 else


More information about the hal-commit mailing list