void-packages/srcpkgs/avahi/INSTALL
Juan RP 54658e4cc5 Added avahi-0.6.25 build template.
--HG--
extra : convert_revision : ddfec312cf9657158ba3af47f902c9d2441c7e15
2009-12-08 10:51:53 +01:00

35 lines
861 B
Text

#
# This script creates the avahi and netdev system user/group.
#
case "${ACTION}" in
pre)
;;
post)
if ! getent group netdev >/dev/null; then
groupadd -r netdev 2>&1 >/dev/null
[ $? -ne 0 ] && exit $?
echo "Created netdev system group."
fi
if ! getent passwd netdev >/dev/null; then
useradd -c "Network device user" \
-d / -s /sbin/nologin -g netdev -r netdev && \
passwd -l netdev 2>&1 >/dev/null
[ $? -ne 0 ] && exit $?
echo "Created netdev system user."
fi
if ! getent group avahi >/dev/null; then
groupadd -r avahi 2>&1 >/dev/null
[ $? -ne 0 ] && exit $?
echo "Created avahi system group."
fi
if ! getent passwd avahi >/dev/null; then
useradd -c "Avahi daemon" \
-d / -s /sbin/nologin -g avahi -r avahi && \
passwd -l avahi 2>&1 >/dev/null
[ $? -ne 0 ] && exit $?
echo "Created avahi system user."
fi
;;
esac