void-packages/templates/dbus/INSTALL
Juan RP acd07f61e3 Modify the INSTALL/REMOVE scripts to use predef vars and unneeded chroot calls.
--HG--
extra : convert_revision : dfd737c502bea327054ecff5bc1fa152db6e2009
2009-04-08 03:24:57 +02:00

28 lines
712 B
Text

#
# 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