PREIN
/bin/sh
if [ "$1" = "2" ]; then
conflist=`ls /etc/acpi/events/*.conf 2> /dev/null`
RETCODE=$?
if [ $RETCODE -eq 0 ]; then
for i in $conflist; do
rmdot=`echo $i | sed 's/.conf/conf/'`
mv $i $rmdot
done
fi
fi
PREUN
/bin/sh
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
/usr/bin/systemctl --no-reload disable acpid.service > /dev/null 2>&1 || :
/usr/bin/systemctl stop acpid.service > /dev/null 2>&1 || :
fi
POSTIN
/bin/sh
if [ $1 -eq 1 ] ; then
# Initial installation
/usr/bin/systemctl preset acpid.service >/dev/null 2>&1 || :
fi
POSTUN
/bin/sh
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/usr/bin/systemctl try-restart acpid.service >/dev/null 2>&1 || :
fi
Triggers
acpid <
2.0.10-2
/bin/sh
/sbin/chkconfig --del acpid >/dev/null 2>&1 || :
/bin/systemctl try-restart acpid.service >/dev/null 2>&1 || :