Sophie

Sophie

distrib > Fedora > 14 > i386 > media > os > by-pkgid > 816dcedb878da6c453cde4f622a39def > scriptlet

tog-pegasus-2.9.0-11.fc14.i686.rpm

PREIN

/bin/sh
if [ $1 -eq 1 ]; then
#  first install: create the 'pegasus' user and group:
   /usr/sbin/groupadd -g 65 -f -r pegasus >/dev/null 2>&1 || :;
   /usr/sbin/useradd -u 66 -r -N -M -g pegasus -s /sbin/nologin -d /var/lib/Pegasus \
     	 		   -c "tog-pegasus OpenPegasus WBEM/CIM services" pegasus >/dev/null 2>&1 || :;
elif [ $1 -gt 1 ]; then
   if [ -d /var/lib/Pegasus/repository ]; then
	if [ -d /var/lib/Pegasus/prev_repository ]; then
	   mv /var/lib/Pegasus/prev_repository /var/lib/Pegasus/prev_repository_`date '+%Y-%m-%d-%s.%N'`.rpmsave;
	fi;
	mv /var/lib/Pegasus/repository /var/lib/Pegasus/prev_repository;
   fi
fi
:;

PREUN

/bin/sh
if [ $1 -eq 0 ]; then
   /sbin/service tog-pegasus stop >/dev/null 2>&1 || :;
   /sbin/chkconfig --del tog-pegasus >/dev/null 2>&1 || :;
   if [ "$1" -eq 0 ]; then
      /usr/sbin/alternatives --remove pegasus /usr/sbin/cimserver-64 >/dev/null 2>&1 || :;
      /usr/sbin/alternatives --remove pegasus /usr/sbin/cimserver-32 >/dev/null 2>&1 || :;
   fi
fi
:;

POSTIN

/bin/sh
ldconfig;
chkconfig --add tog-pegasus;
if [ $1 -ge 1 ]; then	
   echo `date` >>  /var/lib/Pegasus/log/install.log 2>&1 || :;
    /usr/share/Pegasus/scripts/pegasus_arch_alternatives || :;
   if [ $1 -gt 1 ]; then
      if [ -d /var/lib/Pegasus/prev_repository ]; then
      #  The user's old repository was moved to /var/lib/Pegasus/prev_repository, which 
      #  now must be upgraded to the new repository in /var/lib/Pegasus/repository:
	 /usr/sbin/repupgrade 2>> /var/lib/Pegasus/log/install.log || :;
         mv /var/lib/Pegasus/prev_repository /var/lib/Pegasus/prev_repository_`date '+%Y-%m-%d-%s.%N'`.rpmsave;
      fi;
      /sbin/service tog-pegasus condrestart >/dev/null 2>&1 || :;
   fi;
fi
:;