PREUN
/bin/sh
#Stop oki4daemon when uninstalling printer-filters
/usr/share/rpm-helper/del-service oki4linux $1 oki4daemon
POSTIN
/bin/sh
/usr/share/rpm-helper/add-service oki4linux $1 oki4daemon
# Restart the oki4daemon when it is running, but do not activate it by
# default. It blocks the parallel port for non-OKI devices.
if [ "$1" -ne "1" ]; then
# On update
service oki4daemon condrestart > /dev/null 2>/dev/null || :
else
# Turn it off, as printerdrake will enable it if used.
# Otherwise this will make printerdrake pop up every boote
chkconfig --level 2345 oki4daemon off
fi
POSTUN
/bin/sh
if [ "$1" -ge "1" ]; then
# On update
/sbin/service oki4daemon condrestart >/dev/null 2>&1
fi