summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2014-08-21 06:00:45 +0200
committerMichael Biebl <biebl@debian.org>2014-08-21 06:01:38 +0200
commitdeb066472053cdce42a48fef22a9184519afd0d3 (patch)
treea4fda140fa301bb6643c713494a02c71849ca140
parenta77718b4cab335cd3af3e4f7cf87aa730a237022 (diff)
downloaddbus-deb066472053cdce42a48fef22a9184519afd0d3.tar.gz
Don't attempt config reload if dbus system bus is not running.
There is no point to attemp a reload if the system bus is not running and we avoid a warning upon initial installation this way. Update the comment to reflect recent changes.
-rw-r--r--debian/changelog6
-rw-r--r--debian/dbus.postinst8
2 files changed, 8 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog
index 99ca94e2..e654e277 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+dbus (1.8.6-3) UNRELEASED; urgency=medium
+
+ * Don't attempt config reload if dbus system bus is not running.
+
+ -- Michael Biebl <biebl@debian.org> Thu, 21 Aug 2014 05:56:30 +0200
+
dbus (1.8.6-2) unstable; urgency=medium
* debian/dbus.posinst: When triggered only poke the dbus-daemon, don't run
diff --git a/debian/dbus.postinst b/debian/dbus.postinst
index a93f8551..e4c5cf5a 100644
--- a/debian/dbus.postinst
+++ b/debian/dbus.postinst
@@ -9,13 +9,9 @@ MESSAGEHOME=/var/run/dbus
LAUNCHER=/usr/lib/dbus-1.0/dbus-daemon-launch-helper
# This is what the init script would do, but it's simpler (and less
-# dependent on sysvinit vs. Upstart vs. etc.) if we do it directly. It is not
-# conditional on "$1" because it's also the right thing to do for the
-# /etc/dbus-1/system.d and /usr/share/dbus-1/system-services triggers.
-#
-# If it's not running (perhaps we're in a chroot) this will just fail
-# harmlessly, so there's no need to condition on status.
+# dependent on sysvinit vs. Upstart vs. etc.) if we do it directly.
reload_dbus_config() {
+ [ -S /var/run/dbus/system_bus_socket ] || return 0
dbus-send --print-reply --system --type=method_call \
--dest=org.freedesktop.DBus \
/ org.freedesktop.DBus.ReloadConfig > /dev/null || true