2009-03-20 06:02:37 +01:00
|
|
|
#
|
|
|
|
# This script fixes permissions for dbus-daemon-launch-helper
|
|
|
|
# and creates the dbus system user/group.
|
|
|
|
#
|
|
|
|
dbus_launch="./usr/libexec/dbus-daemon-launch-helper"
|
|
|
|
|
2009-04-08 03:24:57 +02:00
|
|
|
case "${ACTION}" in
|
2009-03-20 06:02:37 +01:00
|
|
|
pre)
|
|
|
|
;;
|
|
|
|
post)
|
2009-04-08 03:24:57 +02:00
|
|
|
echo "Running ${PKGNAME}-${VERSION} post installation hooks..."
|
|
|
|
if ! getent group dbus >/dev/null; then
|
|
|
|
groupadd -r dbus 2>&1 >/dev/null
|
2009-03-22 03:57:14 +01:00
|
|
|
[ $? -ne 0 ] && exit $?
|
|
|
|
echo "Created dbus system group."
|
2009-03-20 06:02:37 +01:00
|
|
|
fi
|
2009-04-08 03:24:57 +02:00
|
|
|
if ! getent passwd dbus >/dev/null; then
|
|
|
|
useradd -c "System message bus" \
|
2009-03-20 06:02:37 +01:00
|
|
|
-d /var/run/dbus \
|
|
|
|
-s /sbin/nologin -g dbus -r dbus && \
|
2009-04-08 03:24:57 +02:00
|
|
|
passwd -l dbus 2>&1 >/dev/null
|
2009-03-22 03:57:14 +01:00
|
|
|
[ $? -ne 0 ] && exit $?
|
|
|
|
echo "Created dbus system user."
|
2009-03-20 06:02:37 +01:00
|
|
|
fi
|
2009-04-08 03:24:57 +02:00
|
|
|
chown root:dbus ${dbus_launch}
|
|
|
|
chmod 4750 ${dbus_launch}
|
2009-03-20 06:02:37 +01:00
|
|
|
;;
|
|
|
|
esac
|