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