Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 0dc8ef033c2b33f5cebd625222e668f3 > scriptlet

dpm-name-server-mysql-1.8.7-4.fc18.i686.rpm

PREUN

/bin/sh
export LANG=C

if [ $1 -eq 0 ]; then
    if ( /usr/sbin/update-alternatives --display dpnsdaemon | \
	grep currently | grep -q dpm-mysql ) ; then
	
if [ $1 -eq 0 ] ; then 
        # Package removal, not upgrade 
        /usr/bin/systemctl --no-reload disable dpnsdaemon.service > /dev/null 2>&1 || : 
        /usr/bin/systemctl stop dpnsdaemon.service > /dev/null 2>&1 || : 
fi 
    fi
    /usr/sbin/update-alternatives --remove dpnsdaemon \
	/usr/lib/dpm-mysql/dpnsdaemon
fi

POSTIN

/bin/sh
# Clean up pre-systemd config
if [ -r /etc/rc.d/init.d/dpnsdaemon ] ; then
    /sbin/service dpnsdaemon stop > /dev/null 2>&1 || :
    /sbin/chkconfig --del dpnsdaemon > /dev/null 2>&1 || :
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/lcgdm/NSCONFIG.templ NSCONFIG.templ \
	  /usr/lib/dpm-mysql/NSCONFIG.templ \
  --slave /usr/lib/systemd/system/dpnsdaemon.service dpnsdaemon.service \
	  /usr/share/dpm-mysql/dpnsdaemon.service \
  --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

    
if [ $1 -eq 1 ] ; then 
        # Initial installation 
        /usr/bin/systemctl preset dpnsdaemon.service >/dev/null 2>&1 || : 
fi

POSTUN

/bin/sh
export LANG=C

if [ $1 -ge 1 ]; then
    if ( /usr/sbin/update-alternatives --display dpnsdaemon | \
	grep currently | grep -q dpm-mysql ) ; then
	
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : 
if [ $1 -ge 1 ] ; then 
        # Package upgrade, not uninstall 
        /usr/bin/systemctl try-restart dpnsdaemon.service >/dev/null 2>&1 || : 
fi 
    fi
fi