Sophie

Sophie

distrib > Mandriva > 2011.0 > x86_64 > media > main-release > by-pkgid > a6c4356dd64c1b72d0a931bdb5cb2898 > scriptlet

nut-server-2.6.1-1.x86_64.rpm

PREIN

/bin/sh
# Create an UPS user. We do not use the buggy macro /usr/share/rpm-helper/add-group nut $1 anymore.  
/usr/share/rpm-helper/add-user nut $1 ups /var/state/ups /bin/false 
/usr/sbin/usermod -G dialout,tty,usb ups

PREUN

/bin/sh
/usr/share/rpm-helper/del-service nut $1 upsd || :

POSTIN

/bin/sh
/usr/share/rpm-helper/add-service nut $1 upsd || :

POSTUN

/bin/sh
# Only do this if it is not an upgrade
if [ ! -f /usr/sbin/upsmon ]; then
   /usr/share/rpm-helper/del-user nut $1 ups 
fi