Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=f8de4a381b73d8ec20422a38adecccfe0daeb424
commit f8de4a381b73d8ec20422a38adecccfe0daeb424 Author: Miklos Vajna <vmik...@frugalware.org> Date: Tue Jun 2 13:27:44 2009 +0200 hal-0.5.11-7-i686 - don't try to start hald if dbus is not running - post_upgrade should not re-add the hald service - closes #3474 diff --git a/source/apps/hal/FrugalBuild b/source/apps/hal/FrugalBuild index d737537..a878e50 100644 --- a/source/apps/hal/FrugalBuild +++ b/source/apps/hal/FrugalBuild @@ -4,7 +4,7 @@ pkgname=hal pkgver=0.5.11 -pkgrel=6 +pkgrel=7 pkgdesc="Hardware Abstraction Layer" url="http://www.freedesktop.org/wiki/Software/hal" depends=('dbus-glib>=0.74' 'udev>=132' 'util-linux-ng>=2.15' 'glib2' 'libcap' 'dbus>=1.2.12-4' \ @@ -25,7 +25,7 @@ source=(http://hal.freedesktop.org/releases/$pkgname-$pkgver.tar.gz \ hal.conf.patch newer-udev.patch \ move-from-libvolume_id-to-libblkid.patch) sha1sums=('f51366229e5dd6d5d72d60114fdef76bf5feba26' \ - 'bd113f345e7b2671764c8dfb2ed41301fcf42e41' \ + '9b5b15a5e36d4b74e8632548f48d865d7e1f7ceb' \ '2273e77c0c3c52aca31294b2b1a829937d0a3c18' \ '2fab4fd75f1359b0838748dfae4d749eb26b64b9' \ '654235977c83f76433f9737f37b8a18f04136b35' \ diff --git a/source/apps/hal/hal.install b/source/apps/hal/hal.install index 2023d8d..9b1550c 100644 --- a/source/apps/hal/hal.install +++ b/source/apps/hal/hal.install @@ -11,7 +11,8 @@ post_install() /usr/bin/passwd -l hald 2>/dev/null >/dev/null fi - if [ -x /usr/sbin/chkconfig ]; then + # only on install + if [ -n "$1" -a -x /usr/sbin/chkconfig ]; then /usr/sbin/chkconfig --add rc.hald fi } diff --git a/source/apps/hal/rc.hald b/source/apps/hal/rc.hald index 6245b46..027aadb 100644 --- a/source/apps/hal/rc.hald +++ b/source/apps/hal/rc.hald @@ -12,15 +12,17 @@ source /lib/initscripts/functions daemon=$"HAL daemon" actions=(start stop restart status) +pid_dbus="pidof -o %PPID /usr/bin/dbus-daemon" pid="pidof -o %PPID /usr/sbin/hald" rc_start() { start_msg - if [ ! -z "$(eval $pid)" ]; then + if [ -z "$(eval $pid_dbus)" -o -n "$(eval $pid)" ]; then ok 999 else - ## need be here without this use hal does not work + # hald won't be functional without its own group, so add it if + # it's missing if ! grep -q '^hald:' /etc/group; then echo -n "Adding hald group..." groupadd -g 39 hald @@ -30,7 +32,7 @@ rc_start() if ! grep -q '^hald:' /etc/passwd; then echo -n "Adding hald user..." useradd -c 'HAL Daemon' -u 39 -g hald -G cdrom,floppy,camera,storage -d '/' -s /bin/false hald - ## kill password + # lock the account we just created passwd -l hald echo -e "done." fi _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git