PREUN
/bin/sh
export LANG=C
if [ $1 -eq 0 ]; then
if ( /usr/sbin/update-alternatives --display dpnsdaemon | \
grep currently | grep -q dpm-mysql ) ; then
if [ $1 -eq 0 ] && [ -x /usr/bin/systemctl ]; then
# Package removal, not upgrade
/usr/bin/systemctl --no-reload disable --now dpnsdaemon.service || :
fi
fi
/usr/sbin/update-alternatives --remove dpnsdaemon \
/usr/lib64/dpm-mysql/dpnsdaemon
fi
POSTIN
/bin/sh
# Clean up pre-systemd config
if [ -r /etc/rc.d/init.d/dpnsdaemon ] ; then
/sbin/service dpnsdaemon stop > /dev/null 2>&1 || :
/sbin/chkconfig --del dpnsdaemon > /dev/null 2>&1 || :
fi
/usr/sbin/update-alternatives --install /usr/sbin/dpnsdaemon dpnsdaemon \
/usr/lib64/dpm-mysql/dpnsdaemon 20 \
--slave /usr/share/man/man8/dpnsdaemon.8.gz dpnsdaemon.8.gz \
/usr/lib64/dpm-mysql/dpnsdaemon.8.gz \
--slave /usr/share/lcgdm/NSCONFIG.templ NSCONFIG.templ \
/usr/lib64/dpm-mysql/NSCONFIG.templ \
--slave /usr/lib/systemd/system/dpnsdaemon.service dpnsdaemon.service \
/usr/share/dpm-mysql/dpnsdaemon.service \
--slave /etc/logrotate.d/dpnsdaemon dpnsdaemon.logrotate \
/etc/dpm-mysql/dpnsdaemon.logrotate \
--slave /usr/sbin/dpns-shutdown dpns-shutdown \
/usr/lib64/dpm-mysql/dpns-shutdown \
--slave /usr/share/man/man8/dpns-shutdown.8.gz dpns-shutdown.8.gz \
/usr/lib64/dpm-mysql/dpns-shutdown.8.gz
if [ $1 -eq 1 ] && [ -x /usr/bin/systemctl ]; then
# Initial installation
/usr/bin/systemctl --no-reload preset dpnsdaemon.service || :
fi
POSTUN
/bin/sh
export LANG=C
if [ $1 -ge 1 ]; then
if ( /usr/sbin/update-alternatives --display dpnsdaemon | \
grep currently | grep -q dpm-mysql ) ; then
if [ $1 -ge 1 ] && [ -x /usr/bin/systemctl ]; then
# Package upgrade, not uninstall
/usr/bin/systemctl try-restart dpnsdaemon.service || :
fi
fi
fi