Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 28c3e1316cf407928e10edc049c3199c > scriptlet

dpm-postgres-1.7.4.7-3.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 dpm | \
	grep currently | grep -q dpm-postgres && \
	/sbin/service dpm-postgres stop > /dev/null 2>&1 || :
    /usr/sbin/update-alternatives --remove dpm \
	/usr/lib/dpm-postgres/dpm
    /sbin/chkconfig --del dpm-postgres
fi

POSTIN

/bin/sh
if [ $1 = 1 ]; then
    /sbin/chkconfig --add dpm-postgres
fi
/usr/sbin/update-alternatives --install /usr/sbin/dpm dpm \
	  /usr/lib/dpm-postgres/dpm 10 \
  --slave /usr/share/man/man8/dpm.8.gz dpm.8.gz \
	  /usr/lib/dpm-postgres/dpm.8.gz \
  --slave /usr/share/dpm/DPMCONFIG.templ DPMCONFIG.templ \
	  /usr/lib/dpm-postgres/DPMCONFIG.templ \
  --slave /etc/sysconfig/dpm dpm.conf \
	  /etc/dpm-postgres/dpm.conf \
  --slave /etc/logrotate.d/dpm dpm.logrotate \
	  /etc/dpm-postgres/dpm.logrotate \
  --slave /usr/sbin/dpm-shutdown dpm-shutdown \
	  /usr/lib/dpm-postgres/dpm-shutdown \
  --slave /usr/share/man/man8/dpm-shutdown.8.gz dpm-shutdown.8.gz \
	  /usr/lib/dpm-postgres/dpm-shutdown.8.gz \
  --initscript dpm-postgres

POSTUN

/bin/sh
if [ $1 -ge 1 ]; then
    /sbin/service dpm-postgres condrestart > /dev/null 2>&1 || :
fi