PREUN
/bin/sh
export LANG=C
if [ $1 = 0 ]; then
/usr/sbin/update-alternatives --display dpm-srmv2 | \
grep currently | grep -q dpm-mysql && \
/sbin/service dpm-mysql-srmv2 stop > /dev/null 2>&1 || :
/usr/sbin/update-alternatives --remove dpm-srmv2 \
/usr/lib/dpm-mysql/dpm-srmv2
/sbin/chkconfig --del dpm-mysql-srmv2
fi
POSTIN
/bin/sh
if [ $1 = 1 ]; then
/sbin/chkconfig --add dpm-mysql-srmv2
fi
/usr/sbin/update-alternatives --install /usr/sbin/dpm-srmv2 dpm-srmv2 \
/usr/lib/dpm-mysql/dpm-srmv2 20 \
--slave /usr/share/man/man8/dpm-srmv2.8.gz dpm-srmv2.8.gz \
/usr/lib/dpm-mysql/dpm-srmv2.8.gz \
--slave /etc/sysconfig/dpm-srmv2 dpm-srmv2.conf \
/etc/dpm-mysql/dpm-srmv2.conf \
--slave /etc/logrotate.d/dpm-srmv2 dpm-srmv2.logrotate \
/etc/dpm-mysql/dpm-srmv2.logrotate \
--initscript dpm-mysql-srmv2
POSTUN
/bin/sh
export LANG=C
if [ $1 -ge 1 ]; then
/usr/sbin/update-alternatives --display dpm-srmv2 | \
grep currently | grep -q dpm-mysql && \
/sbin/service dpm-mysql-srmv2 condrestart > /dev/null 2>&1 || :
fi