From e98378b2d56f13d40dfe397e050cac467d1f1506 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 4 May 2009 23:58:22 +0200 Subject: [PATCH] dbus: erm readd files removed in previous. --HG-- extra : convert_revision : c0b4c55b3a503f9e9fd21c84957301aa048d703e --- templates/dbus/INSTALL | 28 ++++++++++++++++++++++++++++ templates/dbus/REMOVE | 11 +++++++++++ 2 files changed, 39 insertions(+) create mode 100644 templates/dbus/INSTALL create mode 100644 templates/dbus/REMOVE diff --git a/templates/dbus/INSTALL b/templates/dbus/INSTALL new file mode 100644 index 00000000000..bbe1cc7f8b5 --- /dev/null +++ b/templates/dbus/INSTALL @@ -0,0 +1,28 @@ +# +# This script fixes permissions for dbus-daemon-launch-helper +# and creates the dbus system user/group. +# +dbus_launch="./usr/libexec/dbus-daemon-launch-helper" + +case "${ACTION}" in +pre) + ;; +post) + echo "Running ${PKGNAME}-${VERSION} post installation hooks..." + if ! getent group dbus >/dev/null; then + groupadd -r dbus 2>&1 >/dev/null + [ $? -ne 0 ] && exit $? + echo "Created dbus system group." + fi + if ! getent passwd dbus >/dev/null; then + useradd -c "System message bus" \ + -d /var/run/dbus \ + -s /sbin/nologin -g dbus -r dbus && \ + passwd -l dbus 2>&1 >/dev/null + [ $? -ne 0 ] && exit $? + echo "Created dbus system user." + fi + chown root:dbus ${dbus_launch} + chmod 4750 ${dbus_launch} + ;; +esac diff --git a/templates/dbus/REMOVE b/templates/dbus/REMOVE new file mode 100644 index 00000000000..0ec060b8faa --- /dev/null +++ b/templates/dbus/REMOVE @@ -0,0 +1,11 @@ +# +# This script removes the dbus user/group. +# +case "${ACTION}" in +pre) + userdel dbus 2>&1 >/dev/null + [ $? -eq 0 ] && echo "Removed ${PKGNAME} system user/group." + ;; +post) + ;; +esac