Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > fe5b0f8c005d607a708eee81ce62045e > scriptlet

dpm-server-mysql-1.8.6-1.fc17.i686.rpm

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
	/bin/systemctl --no-reload disable dpm.service \
	    > /dev/null 2>&1 || :
	/bin/systemctl stop dpm.service > /dev/null 2>&1 || :
    fi
    /usr/sbin/update-alternatives --remove dpm \
	/usr/lib/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/lib/dpm-mysql/dpm 20 \
  --slave /usr/share/man/man8/dpm.8.gz dpm.8.gz \
	  /usr/lib/dpm-mysql/dpm.8.gz \
  --slave /usr/share/lcgdm/DPMCONFIG.templ DPMCONFIG.templ \
	  /usr/lib/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/lib/dpm-mysql/dpm-shutdown \
  --slave /usr/share/man/man8/dpm-shutdown.8.gz dpm-shutdown.8.gz \
	  /usr/lib/dpm-mysql/dpm-shutdown.8.gz \
  --slave /usr/sbin/dpm-buildfsv dpm-buildfsv \
	  /usr/lib/dpm-mysql/dpm-buildfsv \
  --slave /usr/share/man/man8/dpm-buildfsv.8.gz dpm-buildfsv.8.gz \
	  /usr/lib/dpm-mysql/dpm-buildfsv.8.gz

if [ $1 -eq 1 ]; then
    /bin/systemctl daemon-reload > /dev/null 2>&1 || :
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
	/bin/systemctl try-restart dpm.service > /dev/null 2>&1 || :
    fi
fi