wok-current rev 4879

hal: Fix reboot issue with Xfce.
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Thu Feb 04 23:55:39 2010 +0100 (2010-02-04)
parents 907333e26d53
children e3f5a7903d8d
files hal/receipt hal/stuff/hal-scripts.u
line diff
     1.1 --- a/hal/receipt	Thu Feb 04 23:33:54 2010 +0100
     1.2 +++ b/hal/receipt	Thu Feb 04 23:55:39 2010 +0100
     1.3 @@ -27,6 +27,7 @@
     1.4  {
     1.5  	cd $src
     1.6  	zcat /usr/share/misc/pci.ids.gz > /usr/share/misc/pci.ids &&
     1.7 +	patch -p1 < ../stuff/hal-scripts.u || exit 1 &&
     1.8  	#patch -p1 < ../stuff/hal-udev.patch || exit 1 &&
     1.9  	./configure \
    1.10  		--prefix=/usr \
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/hal/stuff/hal-scripts.u	Thu Feb 04 23:55:39 2010 +0100
     2.3 @@ -0,0 +1,21 @@
     2.4 +--- hal-0.5.13.ori/tools/linux/hal-system-power-reboot-linux	Sun Aug 10 15:50:10 2008
     2.5 ++++ hal-0.5.13/tools/linux/hal-system-power-reboot-linux	Thu Feb  4 23:41:04 2010
     2.6 +@@ -1,4 +1,6 @@
     2.7 + #!/bin/sh
     2.8 ++# 2010-02-04 erjo@slitaz.org
     2.9 ++# * Use reboot first for Busybox.
    2.10 + 
    2.11 + unsupported() {
    2.12 + 	echo "org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported" >&2
    2.13 +@@ -7,7 +9,10 @@
    2.14 + }
    2.15 + 
    2.16 + #Try for common tools
    2.17 +-if [ -x "/sbin/shutdown" ] ; then
    2.18 ++if [ -x "/sbin/reboot" ] ; then
    2.19 ++	/sbin/reboot
    2.20 ++	exit $?
    2.21 ++elif [ -x "/sbin/shutdown" ] ; then
    2.22 + 	/sbin/shutdown -r now
    2.23 + 	exit $?
    2.24 + elif [ -x "/usr/sbin/shutdown" ] ; then