PREIN
/bin/sh
# Add the "haldaemon" user
/usr/sbin/useradd -c 'HAL daemon' -u 68 \
-s /sbin/nologin -r -d '/' haldaemon 2> /dev/null || :
PREUN
/bin/sh
if [ $1 -eq 0 ]; then
service haldaemon stop > /dev/null 2>&1
/sbin/chkconfig --del haldaemon
/bin/systemctl stop haldaemon.service >/dev/null 2>&1 || :
fi
POSTIN
/bin/sh
/sbin/ldconfig
/sbin/chkconfig --add haldaemon
if [ $1 -eq 1 ]; then
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
POSTUN
/bin/sh
/sbin/ldconfig
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
#if [ "$1" -ge "1" ]; then
# service haldaemon condrestart > /dev/null 2>&1
#fi
Triggers
hal <
0.5.7-3
/bin/sh
#remove lingering fstab-sync entries from /etc/fstab
/bin/cp -f /etc/fstab /etc/fstab.hal-save
(IFS="
"; while read line; do echo $line | awk '{print $4}' | grep -q managed || echo $line | grep -q "^#.*fstab-sync" || echo $line; done < /etc/fstab > fstab.replace)
if [ -s fstab.replace ]; then
/bin/cp -f fstab.replace /etc/fstab
fi
hal <
0.5.11-0.1.rc1
/bin/sh
if [ "$1" -ge "1" ]; then
mv -uf /var/lib/hal/acl-list /var/run/hald 2>/dev/null || :
rm -rf /var/lib/hal
fi