dbus: add a rc.d script, create dbus user/group dbus for binpkgs.
--HG-- extra : convert_revision : 48ea6899a325893f2d5ca0f61159b37085e79a47
This commit is contained in:
26
templates/dbus/INSTALL
Normal file
26
templates/dbus/INSTALL
Normal file
@@ -0,0 +1,26 @@
|
||||
#
|
||||
# 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 "$2" in
|
||||
pre)
|
||||
;;
|
||||
post)
|
||||
echo "Running $3-$4 post installation hooks..."
|
||||
if getent group dbus >/dev/null; then
|
||||
chroot . groupadd -r dbus
|
||||
[ $? -eq 0 ] && echo "Created dbus system group."
|
||||
fi
|
||||
if getent passwd dbus >/dev/null; then
|
||||
chroot . useradd -c "System message bus" \
|
||||
-d /var/run/dbus \
|
||||
-s /sbin/nologin -g dbus -r dbus && \
|
||||
chroot . passwd -l dbus &>/dev/null
|
||||
[ $? -eq 0 ] && echo "Created dbus system user."
|
||||
fi
|
||||
chroot . chown root:dbus ${dbus_launch}
|
||||
chroot . chmod 4750 ${dbus_launch}
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user