avahi: fix postinst script error
authorJohn Lee <john_lee@openmoko.com>
Fri, 21 Nov 2008 15:38:21 +0000 (23:38 +0800)
committerJohn Lee <john_lee@openmoko.org>
Mon, 22 Dec 2008 10:26:40 +0000 (18:26 +0800)
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.

packages/avahi/avahi-python_0.6.21.bb
packages/avahi/avahi-ui_0.6.21.bb
packages/avahi/avahi.inc
packages/avahi/avahi_0.6.19.bb
packages/avahi/avahi_0.6.20.bb
packages/avahi/avahi_0.6.21.bb
packages/avahi/avahi_0.6.22.bb
packages/avahi/avahi_0.6.23.bb

index 25ca037..639f1de 100644 (file)
@@ -1,6 +1,6 @@
 require avahi.inc
 
-PR = "r7"
+PR = "r8"
 
 # FIXME: without --enable-gtk, avahi-discover (pygtk) won't be built
 FILES_avahi-discover = ""
index 28d4c07..4323b49 100644 (file)
@@ -1,6 +1,6 @@
 require avahi.inc
 
-PR = "r7"
+PR = "r8"
 
 DEPENDS += "avahi gtk+"
 
index 9a06855..cbd6ac3 100644 (file)
@@ -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
 }
 
index 6bc5a70..f3e9c6b 100644 (file)
@@ -1,3 +1,3 @@
 require avahi.inc
 
-PR = "r9"
+PR = "r10"
index 6bc5a70..f3e9c6b 100644 (file)
@@ -1,3 +1,3 @@
 require avahi.inc
 
-PR = "r9"
+PR = "r10"
index c6236ad..04f92f1 100644 (file)
@@ -1,6 +1,6 @@
 require avahi.inc
 
-PR = "r9"
+PR = "r10"
 
 SRC_URI += "file://dbus-pre-1.1.1-support.patch;patch=1"
 SRC_URI += "file://avr32-ipv6-fix.patch;patch=1"
index 43c1b15..f1f82a0 100644 (file)
@@ -1,6 +1,6 @@
 require avahi.inc
 
 DEPENDS += "intltool-native"
-PR = "r9"
+PR = "r10"
 
 PACKAGES =+ "libavahi-gobject"
index 15f56ff..61a62a5 100644 (file)
@@ -1,5 +1,7 @@
 require avahi.inc
 
+PR = "r1"
+
 DEPENDS += "intltool-native"
 
 PACKAGES =+ "libavahi-gobject"