Sophie

Sophie

distrib > Mandriva > 9.0 > x86_64 > media > main > by-pkgid > b086c13afb19869aaa656ab6a0a04f00 > scriptlet

nut-1.0.0-3mdk.x86_64.rpm

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 
#groupadd -r ups >/dev/null 2>&1 || :
#useradd -M -r -g ups -d /var/state/ups -s "" -c "UPSD Daemon" -G tty,usb ups 2> /dev/null || true

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