diff options
author | Simon McVittie <smcv@debian.org> | 2015-02-19 13:52:02 +0000 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2015-02-19 13:52:02 +0000 |
commit | 7cc7b118d5dbee743e15a37a4023042b0f3d7827 (patch) | |
tree | ce5368cb357e75de1d817d8fddcc85274f758081 | |
parent | ea52c1f3e81e2975634b0c2e1cfabdee14403473 (diff) | |
download | dbus-7cc7b118d5dbee743e15a37a4023042b0f3d7827.tar.gz |
Change the check for requiring a reboot to be init-system-agnostic so Ubuntu can stop patching it (partially addresses #712167)
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/dbus.postinst | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 444564db..7cb53013 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ dbus (1.9.12-1) UNRELEASED; urgency=medium * New upstream release adds AppArmor mediation support - enable AppArmor in the normal build, disable it in the udeb - disable build of ducktype docs for now, it isn't in Debian + * Change the check for requiring a reboot to be init-system-agnostic + so Ubuntu can stop patching it (partially addresses #712167) -- Simon McVittie <smcv@debian.org> Thu, 19 Feb 2015 13:37:51 +0000 diff --git a/debian/dbus.postinst b/debian/dbus.postinst index c76a02c6..adc2114b 100644 --- a/debian/dbus.postinst +++ b/debian/dbus.postinst @@ -52,7 +52,19 @@ if [ "$1" = configure ] && [ -n "$2" ]; then # system bus is not supported by upstream). The code added by # dh_installinit -r creates a start action, below. - if [ -x "/etc/init.d/dbus" ] && /etc/init.d/dbus status > /dev/null; then + # Recommend a reboot if there is a dbus-daemon running in the same root + # as us. Deliberately not using anything init-related here, to be + # init-agnostic: if we get a false positive (at least one dbus-daemon + # is running but it isn't the system bus) that isn't the end of the + # world, because it's probably a session bus, so the user needs to + # log out and back in anyway. + # + # Debian has /usr/bin/dbus-daemon, Ubuntu has /bin/dbus-daemon. + # Look for both. + if pidof -c /bin/dbus-daemon /usr/bin/dbus-daemon >/dev/null; then + echo "A reboot is required to replace the running dbus-daemon." >&2 + echo "Please reboot the system when convenient." >&2 + # trigger an update notification which recommends to reboot [ -x /usr/share/update-notifier/notify-reboot-required ] && \ /usr/share/update-notifier/notify-reboot-required || true |