hal/tools hal-system-power-hibernate, 1.5,
1.6 hal-system-power-suspend, 1.4, 1.5
Danny Kukawka
dkukawka at freedesktop.org
Mon Jan 16 04:47:42 PST 2006
Update of /cvs/hal/hal/tools
In directory gabe:/tmp/cvs-serv25892/tools
Modified Files:
hal-system-power-hibernate hal-system-power-suspend
Log Message:
2006-01-16 Danny Kukawka <danny.kukawka at web.de>
* tools/hal-system-power-hibernate, tools/hal-system-power-suspend:
Changed call of powersave fom call binary to call powersave dbus
interface to be able to differ between root and normal user (patch
from Holger Macht <hmacht at suse.de>) if HAL run as root.
Index: hal-system-power-hibernate
===================================================================
RCS file: /cvs/hal/hal/tools/hal-system-power-hibernate,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- hal-system-power-hibernate 28 Sep 2005 16:52:13 -0000 1.5
+++ hal-system-power-hibernate 16 Jan 2006 12:47:40 -0000 1.6
@@ -1,5 +1,9 @@
#!/bin/sh
+POWERSAVED_SUSPEND2DISK="dbus-send --system --dest=com.novell.powersave \
+ --print-reply /com/novell/powersave \
+ com.novell.powersave.action.SuspendToDisk"
+
unsupported() {
echo org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported >&2
echo No hibernate script found >&2
@@ -9,7 +13,7 @@
#SuSE and ALTLinux only support powersave
if [ -f /etc/altlinux-release ] || [ -f "/etc/SuSE-release" ] ; then
if [ -x /usr/bin/powersave ] ; then
- /usr/bin/powersave --suspend-to-disk
+ $POWERSAVED_SUSPEND2DISK
RET=$?
else
unsupported
@@ -27,7 +31,7 @@
#Other distros just need to have *any* tools installed
else
if [ -x "/usr/bin/powersave" ] ; then
- /usr/bin/powersave --suspend-to-disk
+ $POWERSAVED_SUSPEND2DISK
RET=$?
elif [ -x "/usr/sbin/pmi" ] ; then
/usr/sbin/pmi action hibernate force
Index: hal-system-power-suspend
===================================================================
RCS file: /cvs/hal/hal/tools/hal-system-power-suspend,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- hal-system-power-suspend 29 Nov 2005 17:47:54 -0000 1.4
+++ hal-system-power-suspend 16 Jan 2006 12:47:40 -0000 1.5
@@ -1,5 +1,9 @@
#!/bin/sh
+POWERSAVED_SUSPEND2RAM="dbus-send --system --dest=com.novell.powersave \
+ --print-reply /com/novell/powersave \
+ com.novell.powersave.action.SuspendToRam"
+
alarm_not_supported() {
echo org.freedesktop.Hal.Device.SystemPowerManagement.AlarmNotSupported >&2
echo Waking the system up is not supported >&2
@@ -17,7 +21,7 @@
#SuSE and ALTLinux only support powersave
if [ -f "/etc/altlinux-release" ] || [ -f "/etc/SuSE-release" ] ; then
if [ -x /usr/bin/powersave ] ; then
- /usr/bin/powersave --suspend-to-ram
+ $POWERSAVED_SUSPEND2RAM
RET=$?
else
# TODO: add support
@@ -43,7 +47,7 @@
#Other distros just need to have *any* tools installed
else
if [ -x "/usr/bin/powersave" ] ; then
- /usr/bin/powersave --suspend-to-ram
+ $POWERSAVED_SUSPEND2RAM
RET=$?
elif [ -x "/usr/sbin/pmi" ] ; then
/usr/sbin/pmi action suspend force
More information about the hal-commit
mailing list