1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
#!/bin/sh
# Copyright © 2003 Colin Walters <walters@debian.org>
# Copyright © 2006 Sjoerd Simons <sjoerd@debian.org>
set -e
MESSAGEUSER=messagebus
MESSAGEHOME=/var/run/dbus
LAUNCHER=/usr/lib/dbus-1.0/dbus-daemon-launch-helper
if [ "$1" = configure ]; then
adduser --system \
--home "$MESSAGEHOME" \
--no-create-home \
--disabled-password \
--group "$MESSAGEUSER"
chown "$MESSAGEUSER":"$MESSAGEUSER" "$MESSAGEHOME"
if ! dpkg-statoverride --list "$LAUNCHER" >/dev/null 2>&1; then
chown root:"$MESSAGEUSER" "$LAUNCHER"
chmod 4754 "$LAUNCHER"
fi
fi
# update init script symlinks for new runlevels and priorities for upgrades
# from older versions
if [ "$1" = configure ] && dpkg --compare-versions "$2" lt-nl 1.1.20-1; then
echo "Reinstalling init script for new runlevels and priorities ..." >&2
# remove old init script symlinks; dh_installinit adds the proper
# update-rc.d snippet later on
update-rc.d -f dbus remove >/dev/null
fi
if [ "$1" = configure ] && [ -n "$2" ] && [ -x "/etc/init.d/dbus" ]; then
# Restart dbus on upgrades.
# dh_installinit -r creates the necessary start action.
invoke-rc.d dbus stop || true
fi
#DEBHELPER#
|