Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 31ab96ffc8c6d64aed7248b2e42e4d23 > scriptlet

uucp-1.07-37.fc18.i686.rpm

PREIN

/bin/sh
getent group uucp >/dev/null || groupadd -g 14 -r uucp
getent passwd uucp >/dev/null || \
useradd -r -u 10 -g uucp -d /var/spool/uucp  \
-c "Uucp user" news
exit 0

PREUN

/bin/sh

if [ $1 -eq 0 ] ; then 
        # Package removal, not upgrade 
        /usr/bin/systemctl --no-reload disable uucp@.service > /dev/null 2>&1 || : 
        /usr/bin/systemctl stop uucp@.service > /dev/null 2>&1 || : 
fi 

if [ $1 -eq 0 ]; then
    /sbin/install-info --del /usr/share/info/uucp.info.gz /usr/share/info/dir || :
fi

POSTIN

/bin/sh

if [ $1 -eq 1 ] ; then 
        # Initial installation 
        /usr/bin/systemctl preset uucp@.service >/dev/null 2>&1 || : 
fi 

# Create initial log files so that logrotate doesn't complain
for n in Log Stats Debug; do
    [ -f /var/log/uucp/$n ] || touch /var/log/uucp/$n
    chown uucp:uucp /var/log/uucp/$n
done
chmod 644 /var/log/uucp/Log /var/log/uucp/Stats
chmod 600 /var/log/uucp/Debug

/sbin/install-info /usr/share/info/uucp.info.gz /usr/share/info/dir || :

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 uucp@.service >/dev/null 2>&1 || : 
fi