From 294c210ae6dfc61dd387db06146b27bff4686ce4 Mon Sep 17 00:00:00 2001 From: Jose V Beneyto Date: Tue, 19 Jan 2010 13:08:06 +0100 Subject: [PATCH] hal: fixed issue when the group 'haldaemon' doesn't exists at host --- hal/.footprint | 6 +++--- hal/.md5sum | 2 +- hal/Pkgfile | 3 +-- hal/rc.hald | 33 +++++++++++++++++++-------------- 4 files changed, 24 insertions(+), 20 deletions(-) diff --git a/hal/.footprint b/hal/.footprint index 7577eed..1ad32e3 100644 --- a/hal/.footprint +++ b/hal/.footprint @@ -158,10 +158,10 @@ drwxr-xr-x root/root usr/share/hal/fdi/preprobe/10osvendor/ drwxr-xr-x root/root usr/share/hal/fdi/preprobe/20thirdparty/ drwxr-xr-x root/root var/ drwxr-xr-x root/root var/cache/ -drwxr-xr-x haldaemon/haldaemon var/cache/hald/ +drwxr-xr-x root/root var/cache/hald/ drwxr-xr-x root/root var/lib/ -drwxr-xr-x haldaemon/haldaemon var/lib/hal/ +drwxr-xr-x root/root var/lib/hal/ drwxr-xr-x root/root var/run/ -drwxr-xr-x haldaemon/haldaemon var/run/hald/ +drwxr-xr-x root/root var/run/hald/ drwxr-xr-x root/root var/run/hald/hald-local/ drwxr-xr-x root/root var/run/hald/hald-runner/ diff --git a/hal/.md5sum b/hal/.md5sum index 7f6ea31..0466916 100644 --- a/hal/.md5sum +++ b/hal/.md5sum @@ -1,3 +1,3 @@ e9163df591a6f38f59fdbfe33e73bf20 hal-0.5.14.tar.gz d8ce27a76d7cb13ce142cdc33816c8bd hal.conf -cc3d04e7ac09e15f33c530725f43e641 rc.hald +293f2b3363f6f564e34451710e608952 rc.hald diff --git a/hal/Pkgfile b/hal/Pkgfile index bb0849e..f084455 100644 --- a/hal/Pkgfile +++ b/hal/Pkgfile @@ -7,7 +7,7 @@ name=hal version=0.5.14 -release=1 +release=2 source=(http://hal.freedesktop.org/releases/$name-$version.tar.gz \ hal.conf rc.hald) @@ -48,6 +48,5 @@ build() { rm -rf $PKG/usr/share/gtk-doc cp $SRC/hal.conf $PKG/usr/etc/dbus-1/system.d/ mkdir -p $PKG/var/lib/hal - chown haldaemon:haldaemon $PKG/var/lib/hal } diff --git a/hal/rc.hald b/hal/rc.hald index 43629dd..f340aa3 100644 --- a/hal/rc.hald +++ b/hal/rc.hald @@ -3,21 +3,26 @@ # /etc/rc.d/hald: start/stop HAL daemon # +# fix owner/group permisions +if ! find /var/lib/hal -user haldaemon -group haldaemon 2>/dev/null; then + chown haldaemon:haldaemon $PKG/var/lib/hal +fi + case $1 in - start) - /usr/sbin/hald --daemon=yes --use-syslog - ;; - stop) - killall -q /usr/sbin/hald - ;; - restart) - $0 stop - sleep 2 - $0 start - ;; - *) - echo "Usage: $0 [start|stop|restart]" - ;; + start) + /usr/sbin/hald --daemon=yes --use-syslog + ;; + stop) + killall -q /usr/sbin/hald + ;; + restart) + $0 stop + sleep 2 + $0 start + ;; + *) + echo "Usage: $0 [start|stop|restart]" + ;; esac # End of file -- 2.26.2