vp-build/templates/dbus/INSTALL
Juan RP e98378b2d5 dbus: erm readd files removed in previous.
--HG--
extra : convert_revision : c0b4c55b3a503f9e9fd21c84957301aa048d703e
2009-05-04 23:58:22 +02:00

29 lines
712 B
Plaintext

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