Patchwork [1/2] avahi: don't call DBus init script directly

login
register
mail settings
Submitter Ross Burton
Date April 16, 2013, 2:25 p.m.
Message ID <1366122304-32216-1-git-send-email-ross.burton@intel.com>
Download mbox | patch
Permalink /patch/48351/
State Accepted
Commit 03aaa55d73ee7ee44b9c509d75bf61c67b2c4a38
Headers show

Comments

Ross Burton - April 16, 2013, 2:25 p.m.
After installing Avahi we need DBus to reload it's configuration.  In a
pure-systemd image there isn't a DBus init script to reload, so cut out the
middleman and just sent SIGHUP to all running dbus-daemon processes instead.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-connectivity/avahi/avahi.inc |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Patch

diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc
index d8d9a9d..c302f87 100644
--- a/meta/recipes-connectivity/avahi/avahi.inc
+++ b/meta/recipes-connectivity/avahi/avahi.inc
@@ -136,11 +136,7 @@  do_install() {
 
 pkg_postinst_avahi-daemon () {
 if [ -z "$D" ]; then
-	DBUSPID=`pidof dbus-daemon`
-
-	if [ "x$DBUSPID" != "x" ]; then
-		/etc/init.d/dbus-1 force-reload
-	fi
+	killall -q -HUP dbus-daemon || true
 fi
 }