PREIN
/bin/sh
getent group dpmmgr > /dev/null || groupadd -r dpmmgr
getent passwd dpmmgr > /dev/null || useradd -r -g dpmmgr \
-d /var/lib/dpm -s /bin/bash -c "DPM Manager" dpmmgr
exit 0
PREUN
/bin/sh
export LANG=C
if [ $1 = 0 ]; then
/usr/sbin/update-alternatives --display dpmcopyd | \
grep currently | grep -q dpm-mysql && \
/sbin/service dpmcopyd stop > /dev/null 2>&1 || :
/usr/sbin/update-alternatives --remove dpmcopyd \
/usr/lib64/dpm-mysql/dpmcopyd
/usr/sbin/update-alternatives --display dpmcopyd > /dev/null || \
/sbin/chkconfig --del dpmcopyd > /dev/null 2>&1 || :
fi
POSTIN
/bin/sh
/usr/sbin/update-alternatives --install /usr/sbin/dpmcopyd dpmcopyd \
/usr/lib64/dpm-mysql/dpmcopyd 20 \
--slave /usr/share/man/man8/dpmcopyd.8.gz dpmcopyd.8.gz \
/usr/lib64/dpm-mysql/dpmcopyd.8.gz \
--slave /etc/rc.d/init.d/dpmcopyd dpmcopyd.init \
/etc/dpm-mysql/dpmcopyd.init \
--slave /etc/sysconfig/dpmcopyd dpmcopyd.conf \
/etc/dpm-mysql/dpmcopyd.conf \
--slave /etc/logrotate.d/dpmcopyd dpmcopyd.logrotate \
/etc/dpm-mysql/dpmcopyd.logrotate
if [ $1 = 1 ]; then
if [ -r /etc/rc.d/init.d/dpmcopyd ]; then
/sbin/chkconfig --add dpmcopyd
fi
fi
POSTUN
/bin/sh
export LANG=C
if [ $1 -ge 1 ]; then
/usr/sbin/update-alternatives --display dpmcopyd | \
grep currently | grep -q dpm-mysql && \
/sbin/service dpmcopyd condrestart > /dev/null 2>&1 || :
fi
Triggers
dpm-mysql-copyd <
1.8.1.2-2
/bin/sh
# Restore alternatives removed by dpm-mysql-copyd preun
/usr/sbin/update-alternatives --install /usr/sbin/dpmcopyd dpmcopyd \
/usr/lib64/dpm-mysql/dpmcopyd 20 \
--slave /usr/share/man/man8/dpmcopyd.8.gz dpmcopyd.8.gz \
/usr/lib64/dpm-mysql/dpmcopyd.8.gz \
--slave /etc/rc.d/init.d/dpmcopyd dpmcopyd.init \
/etc/dpm-mysql/dpmcopyd.init \
--slave /etc/sysconfig/dpmcopyd dpmcopyd.conf \
/etc/dpm-mysql/dpmcopyd.conf \
--slave /etc/logrotate.d/dpmcopyd dpmcopyd.logrotate \
/etc/dpm-mysql/dpmcopyd.logrotate