hal: use trigger to (un)register system user/groups, bumprev.
--HG-- extra : convert_revision : 6a8a4206a3a2b1d2d389d1c25a276f546109094d
This commit is contained in:
@@ -1,26 +1,11 @@
|
||||
#
|
||||
# This script creates the HAL system user/group.
|
||||
# This script creates some required dirs.
|
||||
#
|
||||
|
||||
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
|
||||
|
||||
# Create some required dirs if don't exist.
|
||||
if [ ! -d var/run/hald ]; then
|
||||
mkdir -p var/run/hald
|
||||
|
||||
Reference in New Issue
Block a user