Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 8f1228922bc4ec830584bd355f9840f3 > scriptlet

dpm-copy-server-postgres-1.8.1.2-2.fc14.i686.rpm

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-postgres && \
	/sbin/service dpmcopyd stop > /dev/null 2>&1 || :
    /usr/sbin/update-alternatives --remove dpmcopyd \
	/usr/lib/dpm-postgres/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/lib/dpm-postgres/dpmcopyd 10 \
  --slave /usr/share/man/man8/dpmcopyd.8.gz dpmcopyd.8.gz \
	  /usr/lib/dpm-postgres/dpmcopyd.8.gz \
  --slave /etc/rc.d/init.d/dpmcopyd dpmcopyd.init \
	  /etc/dpm-postgres/dpmcopyd.init \
  --slave /etc/sysconfig/dpmcopyd dpmcopyd.conf \
	  /etc/dpm-postgres/dpmcopyd.conf \
  --slave /etc/logrotate.d/dpmcopyd dpmcopyd.logrotate \
	  /etc/dpm-postgres/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-postgres && \
	/sbin/service dpmcopyd condrestart > /dev/null 2>&1 || :
fi

Triggers

dpm-postgres-copyd < 1.8.1.2-2

/bin/sh
# Restore alternatives removed by dpm-postgres-copyd preun
/usr/sbin/update-alternatives --install /usr/sbin/dpmcopyd dpmcopyd \
	  /usr/lib/dpm-postgres/dpmcopyd 10 \
  --slave /usr/share/man/man8/dpmcopyd.8.gz dpmcopyd.8.gz \
	  /usr/lib/dpm-postgres/dpmcopyd.8.gz \
  --slave /etc/rc.d/init.d/dpmcopyd dpmcopyd.init \
	  /etc/dpm-postgres/dpmcopyd.init \
  --slave /etc/sysconfig/dpmcopyd dpmcopyd.conf \
	  /etc/dpm-postgres/dpmcopyd.conf \
  --slave /etc/logrotate.d/dpmcopyd dpmcopyd.logrotate \
	  /etc/dpm-postgres/dpmcopyd.logrotate

if [ $1 = 1 ]; then
    if [ -r /etc/rc.d/init.d/dpmcopyd ]; then
	/sbin/chkconfig --add dpmcopyd
    fi
fi