Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 97da35cf03718ff73a6393646cefc0b6 > scriptlet

lfc-mysql-1.7.4.7-3.fc14.x86_64.rpm

PREIN

/bin/sh
getent group lfcmgr > /dev/null || groupadd -r lfcmgr
getent passwd lfcmgr > /dev/null || useradd -r -g lfcmgr \
    -d /var/lib/lfc -s /bin/bash -c "LFC Manager" lfcmgr
exit 0

PREUN

/bin/sh
export LANG=C

if [ $1 = 0 ]; then
    /usr/sbin/update-alternatives --display lfcdaemon | \
	grep currently | grep -q lfc-mysql && \
	/sbin/service lfc-mysql stop > /dev/null 2>&1 || :
    /usr/sbin/update-alternatives --remove lfcdaemon \
	/usr/lib64/lfc-mysql/lfcdaemon
    /sbin/chkconfig --del lfc-mysql
fi

POSTIN

/bin/sh
if [ $1 = 1 ]; then
    /sbin/chkconfig --add lfc-mysql
fi
/usr/sbin/update-alternatives --install /usr/sbin/lfcdaemon lfcdaemon \
	  /usr/lib64/lfc-mysql/lfcdaemon 20 \
  --slave /usr/share/man/man8/lfcdaemon.8.gz lfcdaemon.8.gz \
	  /usr/lib64/lfc-mysql/lfcdaemon.8.gz \
  --slave /usr/share/lfc/NSCONFIG.templ NSCONFIG.templ \
	  /usr/lib64/lfc-mysql/NSCONFIG.templ \
  --slave /etc/sysconfig/lfcdaemon lfcdaemon.conf \
	  /etc/lfc-mysql/lfcdaemon.conf \
  --slave /etc/logrotate.d/lfcdaemon lfcdaemon.logrotate \
	  /etc/lfc-mysql/lfcdaemon.logrotate \
  --slave /usr/sbin/lfc-shutdown lfc-shutdown \
	  /usr/lib64/lfc-mysql/lfc-shutdown \
  --slave /usr/share/man/man8/lfc-shutdown.8.gz lfc-shutdown.8.gz \
	  /usr/lib64/lfc-mysql/lfc-shutdown.8.gz \
  --initscript lfc-mysql

POSTUN

/bin/sh
if [ $1 -ge 1 ]; then
    /usr/sbin/update-alternatives --display lfcdaemon | \
	grep currently | grep -q lfc-mysql && \
	/sbin/service lfc-mysql condrestart > /dev/null 2>&1 || :
fi