hal/tools hal-system-power-reboot, 1.1, 1.2 hal-system-power-shutdown, 1.1, 1.2

Danny Kukawka dkukawka at freedesktop.org
Mon Dec 12 15:20:05 PST 2005


Update of /cvs/hal/hal/tools
In directory gabe:/tmp/cvs-serv1964/tools

Modified Files:
	hal-system-power-reboot hal-system-power-shutdown 
Log Message:
2005-12-13  Danny Kukawka  <danny.kukawka at web.de>

        * tools/hal-system-power-reboot,
        tools/hal-system-power-shutdown: Fixed broken scripts and changed
        error messages.



Index: hal-system-power-reboot
===================================================================
RCS file: /cvs/hal/hal/tools/hal-system-power-reboot,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- hal-system-power-reboot	12 Dec 2005 22:15:57 -0000	1.1
+++ hal-system-power-reboot	12 Dec 2005 23:20:03 -0000	1.2
@@ -2,21 +2,17 @@
 
 unsupported() {
 	echo "org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported" >&2
-	echo "No reboot script found" >&2
+	echo "No reboot command found" >&2
 	exit 1
 }
 
 #Try for common tools
+if [ -x "/sbin/shutdown" ] ; then
+	/sbin/shutdown -r now
+	exit $?
+elif [ -x "/usr/sbin/shutdown" ] ; then
+	/usr/sbin/shutdown -r now
+	exit $?
 else
-	if [ -x "/sbin/shutdown" ] ; then
-		/sbin/shutdown -r now
-		RET=$?
-	elif [ -x "/usr/sbin/shutdown" ] ; then
-		/usr/sbin/shutdown -r now
-		RET=$?
-	else
-		unsupported
-		fi
-	fi
-
-exit $RET
+	unsupported
+fi

Index: hal-system-power-shutdown
===================================================================
RCS file: /cvs/hal/hal/tools/hal-system-power-shutdown,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- hal-system-power-shutdown	12 Dec 2005 22:15:57 -0000	1.1
+++ hal-system-power-shutdown	12 Dec 2005 23:20:03 -0000	1.2
@@ -2,21 +2,17 @@
 
 unsupported() {
 	echo "org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported" >&2
-	echo "No shutdown script found" >&2
+	echo "No shutdown command found" >&2
 	exit 1
 }
 
 #Try for common tools
+if [ -x "/sbin/shutdown" ] ; then
+	/sbin/shutdown -h now
+	exit $?
+elif [ -x "/usr/sbin/shutdown" ] ; then
+	/usr/sbin/shutdown -h now
+	exit $?
 else
-	if [ -x "/sbin/shutdown" ] ; then
-		/sbin/shutdown -h now
-		RET=$?
-	elif [ -x "/usr/sbin/shutdown" ] ; then
-		/usr/sbin/shutdown -h now
-		RET=$?
-	else
-		unsupported
-		fi
-	fi
-
-exit $RET
+	unsupported
+fi




More information about the hal-commit mailing list