PREIN
/bin/sh
# Create an UPS user.
/usr/share/rpm-helper/add-user nut $1 ups /var/state/ups /bin/false
/usr/share/rpm-helper/add-group nut $1 ups ups
/usr/share/rpm-helper/add-group nut $1 tty ups
/usr/share/rpm-helper/add-group nut $1 usb ups
/usr/share/rpm-helper/add-group nut $1 uucp ups
PREUN
/bin/sh
# only do this if it is not an upgrade
/usr/share/rpm-helper/del-service nut $1 upsmon
POSTIN
/bin/sh
/usr/share/rpm-helper/add-service nut $1 upsmon
POSTUN
/bin/sh
# Only do this if it is not an upgrade
if [ ! -f /usr/sbin/upsd ]; then
/usr/share/rpm-helper/del-user nut $1 ups
fi