PREIN
/bin/sh
getent group ovirt >/dev/null || /usr/sbin/groupadd -g 108 -r ovirt 2>/dev/null || :
getent passwd ovirt >/dev/null || \
/usr/sbin/useradd -u 108 -g ovirt -c "oVirt" \
-s /sbin/nologin -r -d /var/ovirt ovirt 2> /dev/null || :
PREUN
/bin/sh
if [ "$1" = 0 ] ; then
/sbin/service ovirt-host-browser stop > /dev/null 2>&1
/sbin/service ovirt-host-register stop > /dev/null 2>&1
/sbin/service ovirt-db-omatic stop > /dev/null 2>&1
/sbin/service ovirt-agent stop > /dev/null 2>&1
/sbin/service ovirt-host-collect stop > /dev/null 2>&1
/sbin/service ovirt-mongrel-rails stop > /dev/null 2>&1
/sbin/service ovirt-taskomatic stop > /dev/null 2>&1
/sbin/service ovirt-vnc-proxy stop > /dev/null 2>&1
/sbin/chkconfig --del ovirt-host-browser
/sbin/chkconfig --del ovirt-host-register
/sbin/chkconfig --del ovirt-db-omatic
/sbin/chkconfig --del ovirt-agent
/sbin/chkconfig --del ovirt-host-collect
/sbin/chkconfig --del ovirt-mongrel-rails
/sbin/chkconfig --del ovirt-taskomatic
/sbin/chkconfig --del ovirt-vnc-proxy
fi
POSTIN
/bin/sh
# script
# if this is the initial RPM install, then we want to turn the new services
# on; otherwise, we respect the choices the administrator already has made.
# check this by seeing if each daemon is already installed
/sbin/chkconfig --list ovirt-host-browser >& /dev/null
LISTRET=$?
/sbin/chkconfig --add ovirt-host-browser
if [ $LISTRET -ne 0 ]; then
/sbin/chkconfig ovirt-host-browser on
fi
/sbin/chkconfig --list ovirt-host-register >& /dev/null
LISTRET=$?
/sbin/chkconfig --add ovirt-host-register
if [ $LISTRET -ne 0 ]; then
/sbin/chkconfig ovirt-host-register on
fi
/sbin/chkconfig --list ovirt-db-omatic >& /dev/null
LISTRET=$?
/sbin/chkconfig --add ovirt-db-omatic
if [ $LISTRET -ne 0 ]; then
/sbin/chkconfig ovirt-db-omatic on
fi
/sbin/chkconfig --list ovirt-agent >& /dev/null
LISTRET=$?
/sbin/chkconfig --add ovirt-agent
if [ $LISTRET -ne 0 ]; then
/sbin/chkconfig ovirt-agent on
fi
/sbin/chkconfig --list ovirt-host-collect >& /dev/null
LISTRET=$?
/sbin/chkconfig --add ovirt-host-collect
if [ $LISTRET -ne 0 ]; then
/sbin/chkconfig ovirt-host-collect on
fi
/sbin/chkconfig --list ovirt-mongrel-rails >& /dev/null
LISTRET=$?
/sbin/chkconfig --add ovirt-mongrel-rails
if [ $LISTRET -ne 0 ]; then
/sbin/chkconfig ovirt-mongrel-rails on
fi
/sbin/chkconfig --list ovirt-taskomatic >& /dev/null
LISTRET=$?
/sbin/chkconfig --add ovirt-taskomatic
if [ $LISTRET -ne 0 ]; then
/sbin/chkconfig ovirt-taskomatic on
fi
/sbin/chkconfig --list ovirt-vnc-proxy >& /dev/null
LISTRET=$?
/sbin/chkconfig --add ovirt-vnc-proxy
if [ $LISTRET -ne 0 ]; then
/sbin/chkconfig ovirt-vnc-proxy on
fi