hal: use trigger to (un)register system user/groups, bumprev.

--HG--
extra : convert_revision : 6a8a4206a3a2b1d2d389d1c25a276f546109094d
This commit is contained in:
Juan RP 2009-12-11 12:07:07 +01:00
parent 721938a34e
commit 0092bfdf05
3 changed files with 6 additions and 30 deletions

View File

@ -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

View File

@ -1,13 +0,0 @@
#
# This script removes the HAL user/group.
#
case "${ACTION}" in
pre)
if [ "$UPDATE" = "no" ]; then
userdel hal &>/dev/null
[ $? -eq 0 ] && echo "Removed hal system user/group."
fi
;;
post)
;;
esac

View File

@ -1,7 +1,7 @@
# Template file for 'hal'
pkgname=hal
version=0.5.13
revision=3
revision=4
distfiles="http://hal.freedesktop.org/releases/hal-$version.tar.bz2"
build_style=gnu_configure
configure_args="--enable-static=no --disable-console-kit
@ -21,6 +21,10 @@ conf_files="/etc/dbus-1/system.d/hal.conf
/etc/hal/fdi/policy/10-keymap.fdi"
openrc_services="hal default"
# Create hal system account.
system_accounts="hal"
hal_groups="optical,floppy,storage"
Add_dependency full glibc
Add_dependency full udev
Add_dependency full dbus