From 75fe415843ad6ce187bf2c61b9fdf94f6bd54b40 Mon Sep 17 00:00:00 2001 From: Loic Minier Date: Mon, 18 Feb 2008 16:10:11 +0000 Subject: Simplify dbus.postinst. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/dbus@2083 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/dbus.postinst | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) (limited to 'debian/dbus.postinst') diff --git a/debian/dbus.postinst b/debian/dbus.postinst index 095e64fb..5368bbf0 100644 --- a/debian/dbus.postinst +++ b/debian/dbus.postinst @@ -8,30 +8,20 @@ MESSAGEUSER=messagebus MESSAGEHOME=/var/run/dbus LAUNCHER=/usr/lib/dbus-1.0/dbus-daemon-launch-helper -case "$1" in - configure) - 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 - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac +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 # fix rc symlink priorities for upgrades from older versions if [ "$1" = configure ] && dpkg --compare-versions "$2" lt-nl 1.1.4-1; then -- cgit v1.2.3