diff options
author | Simon McVittie <smcv@debian.org> | 2011-06-08 12:18:17 +0100 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2011-06-29 11:10:30 +0100 |
commit | 4978d544f3e75a909b23d48b0a594f205b3e5099 (patch) | |
tree | 201d6732938d85f1b9ac8697906eab0f533e5132 | |
parent | 5a7c57758adc751e449767aa246f741c7a21e6bd (diff) | |
download | dbus-4978d544f3e75a909b23d48b0a594f205b3e5099.tar.gz |
call ReloadConfig with dbus-send in the postinst, since that'll work regardless of whether dbus was started with sysvinit or Upstart; just call it unconditionally, and ignore any failures we might see (in chroots or if dbus-daemon wasn't running)
-rw-r--r-- | debian/changelog | 4 | ||||
-rw-r--r-- | debian/dbus.postinst | 18 |
2 files changed, 13 insertions, 9 deletions
diff --git a/debian/changelog b/debian/changelog index 6bc5ae70..b2e4a23f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,10 @@ dbus (1.4.12-3) UNRELEASED; urgency=low * Mention CVE-2011-2200 in the changelog for 1.4.12-1 now it has a CVE ID * Merge some things from Ubuntu, via experimental: - run dbus-uuidgen --ensure in postinst + - call ReloadConfig with dbus-send in the postinst, since that'll work + regardless of whether dbus was started with sysvinit or Upstart; just + call it unconditionally, and ignore any failures we might see (in + chroots or if dbus-daemon wasn't running) -- Simon McVittie <smcv@debian.org> Thu, 16 Jun 2011 08:21:35 +0100 diff --git a/debian/dbus.postinst b/debian/dbus.postinst index a2d4519a..f58b73ad 100644 --- a/debian/dbus.postinst +++ b/debian/dbus.postinst @@ -33,20 +33,20 @@ fi if [ "$1" = configure ] && [ -n "$2" ] && [ -x "/etc/init.d/dbus" ]; then # Do not restart dbus on upgrades, only on fresh installations. # (dh_installinit -r creates a start action) - # But do reload it so the machine-id can be generated + # We don't use the init script to reload here either, to reduce divergence + # between Debian (sysvinit) and Ubuntu (Upstart) - the thing to do is the + # same in either case so just do it + if /etc/init.d/dbus status > /dev/null; then # trigger an update notification which recommends to reboot [ -x /usr/share/update-notifier/notify-reboot-required ] && \ /usr/share/update-notifier/notify-reboot-required || true - if [ -x "/etc/init.d/dbus" ]; then - if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then - invoke-rc.d dbus reload || true - else - /etc/init.d/dbus reload || true - fi - fi fi + # If it's not running (perhaps we're in a chroot) this will just fail + # harmlessly + dbus-send --print-reply --system --type=method_call \ + --dest=org.freedesktop.DBus \ + / org.freedesktop.DBus.ReloadConfig > /dev/null || true fi #DEBHELPER# - |