PREIN
/bin/sh
# Check if we have an old fashioned amd.conf and rename if to amd.net
if test "$1" -ne 0; then
if test -r /etc/amd.conf; then
if grep -v -q "auto_dir" /etc/amd.conf; then
if test ! -e /etc/amd.net; then
mv -f /etc/amd.conf /etc/amd.net
fi
fi
fi
fi
PREUN
/bin/sh
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
/usr/bin/systemctl --no-reload disable amd.service > /dev/null 2>&1 || :
/usr/bin/systemctl stop amd.service > /dev/null 2>&1 || :
fi
if [ $1 -eq 0 ]; then
# Package removal, not upgrade
if [ -f /usr/share/info/am-utils.info.gz ]; then
/sbin/install-info --delete /usr/share/info/am-utils.info.gz /usr/share/info/dir || :
fi
fi
POSTIN
/bin/sh
/sbin/ldconfig
if [ $1 -eq 1 ] ; then
# Initial installation
/usr/bin/systemctl preset amd.service >/dev/null 2>&1 || :
fi
if [ -f /usr/share/info/am-utils.info.gz ]; then
/sbin/install-info /usr/share/info/am-utils.info.gz /usr/share/info/dir || :
fi
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 amd.service >/dev/null 2>&1 || :
fi
/sbin/ldconfig
Triggers
am-utils <
6.1.5-19
/bin/sh
# Save the current service runlevel info
# User must manually run systemd-sysv-convert --apply amd
# to migrate them to systemd targets
/usr/bin/systemd-sysv-convert --save amd >/dev/null 2>&1 ||:
# Run these because the SysV package being removed won't do them
/sbin/chkconfig --del amd >/dev/null 2>&1 || :
/bin/systemctl try-restart amd.service >/dev/null 2>&1 || :