summaryrefslogtreecommitdiff
path: root/debian/dbus.postinst
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-03-27 17:42:07 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-03-27 17:42:07 +0300
commit0c9ed253893faa13313fee30ce6dbf40a0339035 (patch)
tree488b25b9c65c93011c75eb09035db2d5ee2f400f /debian/dbus.postinst
parent6a2ee6bd4acd68ec4f28fa397543079d8cab77cc (diff)
parentc1c801dcb5e6470e9327195c89ee2da6e505127b (diff)
downloaddbus-0c9ed253893faa13313fee30ce6dbf40a0339035.tar.gz
Merge branch 'master' of git://anonscm.debian.org/pkg-utopia/dbus
Conflicts: debian/changelog debian/dbus.postinst
Diffstat (limited to 'debian/dbus.postinst')
-rw-r--r--debian/dbus.postinst31
1 files changed, 19 insertions, 12 deletions
diff --git a/debian/dbus.postinst b/debian/dbus.postinst
index 7d16d571..64259aec 100644
--- a/debian/dbus.postinst
+++ b/debian/dbus.postinst
@@ -7,9 +7,23 @@ set -e
MESSAGEUSER=messagebus
MESSAGEHOME=/var/run/dbus
LAUNCHER=/usr/lib/dbus-1.0/dbus-daemon-launch-helper
-
SMF_FMRI=svc:/system/dbus:default
+# 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.
+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
+}
+
+
+if [ "$1" = triggered ]; then
+ reload_dbus_config
+ exit 0
+fi
+
if [ "$1" = configure ]; then
adduser --system \
--quiet \
@@ -18,9 +32,8 @@ if [ "$1" = configure ]; then
--disabled-password \
--group "$MESSAGEUSER"
- if ! dpkg-statoverride --list "$LAUNCHER" >/dev/null 2>&1; then
- chown root:"$MESSAGEUSER" "$LAUNCHER"
- chmod 4754 "$LAUNCHER"
+ if ! dpkg-statoverride --list "$LAUNCHER" >/dev/null; then
+ dpkg-statoverride --update --add root "$MESSAGEUSER" 4754 "$LAUNCHER"
fi
# This is idempotent, so it's OK to do every time. The system bus' init
@@ -53,14 +66,8 @@ if [ "$1" = configure ] && [ -n "$2" ]; then
[ -x /usr/share/update-notifier/notify-reboot-required ] && \
/usr/share/update-notifier/notify-reboot-required || true
fi
-
- # This is what the init script would do, but it's simpler (and less
- # dependent on sysvinit vs. Upstart) if we do it directly.
- # 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.
- dbus-send --print-reply --system --type=method_call \
- --dest=org.freedesktop.DBus \
- / org.freedesktop.DBus.ReloadConfig > /dev/null || true
fi
+reload_dbus_config
+
#DEBHELPER#