PREUN
/bin/sh
export LANG=C
if [ $1 -eq 0 ]; then
if ( /usr/sbin/update-alternatives --display dpm | \
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 dpm.service || :
fi
fi
/usr/sbin/update-alternatives --remove dpm \
/usr/lib64/dpm-mysql/dpm
fi
POSTIN
/bin/sh
# Clean up pre-systemd config
if [ -r /etc/rc.d/init.d/dpm ] ; then
/sbin/service dpm stop > /dev/null 2>&1 || :
/sbin/chkconfig --del dpm > /dev/null 2>&1 || :
fi
/usr/sbin/update-alternatives --install /usr/sbin/dpm dpm \
/usr/lib64/dpm-mysql/dpm 20 \
--slave /usr/share/man/man8/dpm.8.gz dpm.8.gz \
/usr/lib64/dpm-mysql/dpm.8.gz \
--slave /usr/share/lcgdm/DPMCONFIG.templ DPMCONFIG.templ \
/usr/lib64/dpm-mysql/DPMCONFIG.templ \
--slave /usr/lib/systemd/system/dpm.service dpm.service \
/usr/share/dpm-mysql/dpm.service \
--slave /etc/logrotate.d/dpm dpm.logrotate \
/etc/dpm-mysql/dpm.logrotate \
--slave /usr/sbin/dpm-shutdown dpm-shutdown \
/usr/lib64/dpm-mysql/dpm-shutdown \
--slave /usr/share/man/man8/dpm-shutdown.8.gz dpm-shutdown.8.gz \
/usr/lib64/dpm-mysql/dpm-shutdown.8.gz \
--slave /usr/sbin/dpm-buildfsv dpm-buildfsv \
/usr/lib64/dpm-mysql/dpm-buildfsv \
--slave /usr/share/man/man8/dpm-buildfsv.8.gz dpm-buildfsv.8.gz \
/usr/lib64/dpm-mysql/dpm-buildfsv.8.gz
if [ $1 -eq 1 ] && [ -x /usr/bin/systemctl ]; then
# Initial installation
/usr/bin/systemctl --no-reload preset dpm.service || :
fi
POSTUN
/bin/sh
export LANG=C
if [ $1 -ge 1 ]; then
if ( /usr/sbin/update-alternatives --display dpm | \
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 dpm.service || :
fi
fi
fi