diff options
author | John Lee <john_lee@openmoko.com> | 2008-11-21 23:38:21 +0800 |
---|---|---|
committer | John Lee <john_lee@openmoko.org> | 2008-12-22 18:26:40 +0800 |
commit | 21de9babc2da7c7b6d43ac37a22e237c94120426 (patch) | |
tree | 36c88bb0e024bee17ab8e9b9719964c241e3dcdb /packages/avahi/avahi.inc | |
parent | bc01e920ab6319679ab1f29f3b3e2e0258c2ab55 (diff) |
avahi: fix postinst script error
The previous version of dbus-1 will not stop clean if there exists
running 'dbus-daemon --session' in the system. That will cause the
script to believe it should ask for a force-reload of dbus, which
leads to an error exit because the 'dbus-daemon --system' wasn't
really running.
Diffstat (limited to 'packages/avahi/avahi.inc')
-rw-r--r-- | packages/avahi/avahi.inc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/avahi/avahi.inc b/packages/avahi/avahi.inc index 9a0685578c..cbd6ac3d03 100644 --- a/packages/avahi/avahi.inc +++ b/packages/avahi/avahi.inc @@ -76,10 +76,11 @@ pkg_postinst_avahi-daemon () { grep "^avahi:" /etc/group > /dev/null || addgroup avahi grep "^avahi:" /etc/passwd > /dev/null || adduser --disabled-password --system --home /var/run/avahi-daemon --no-create-home avahi --ingroup avahi -g Avahi - DBUSPID=`pidof dbus-daemon` - - if [ "x$DBUSPID" != "x" ]; then - /etc/init.d/dbus-1 force-reload + DBUSPID="/var/run/dbus/pid" + if [ -f $DBUSPID ]; then + if ps `cat $DBUSPID` > /dev/null; then + /etc/init.d/dbus-1 force-reload + fi fi } |