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