acd07f61e3
--HG-- extra : convert_revision : dfd737c502bea327054ecff5bc1fa152db6e2009
24 lines
542 B
Text
24 lines
542 B
Text
#
|
|
# This script creates the HAL system user/group.
|
|
#
|
|
|
|
case "${ACTION}" in
|
|
pre)
|
|
;;
|
|
post)
|
|
echo "Running ${PKGNAME}-${VERSION} post installation hooks..."
|
|
if ! getent group hal >/dev/null; then
|
|
groupadd -r hal 2>&1 >/dev/null
|
|
[ $? -ne 0 ] && exit $?
|
|
echo "Created HAL system group."
|
|
fi
|
|
if ! getent passwd hal >/dev/null; then
|
|
useradd -c "HAL daemon" \
|
|
-d / -s /sbin/nologin -g hal \
|
|
-G optical,floppy,storage -r hal && \
|
|
passwd -l hal 2>&1 >/dev/null
|
|
[ $? -ne 0 ] && exit $?
|
|
echo "Created HAL system user."
|
|
fi
|
|
;;
|
|
esac
|