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