Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > media > main > by-pkgid > dcd4e67579cdfc4e8f29852e3aa9e2f7 > scriptlet

sysstat-7.0.2-13.el5.x86_64.rpm

PREUN

/bin/sh
if [ "$1" = 0 ]; then
  # Remove sa logs if removing sysstat completely
  rm -f /var/log/sa/*
  # Remove service
  /sbin/chkconfig --del sysstat
fi

POSTIN

/bin/sh
/sbin/chkconfig --add sysstat

Triggers

sysstat <= 3.3.3-1

/bin/sh
# earlier versions of sysstat had crontabs done in a bad way.  fix it.
if [ `id -u` = "0" -a "$1" -ge "2" ]; then
	if grep -E -v 'sysstat|sa1|sa2' /etc/crontab > /etc/crontab.tmp.$$; then
		cp -dpf /etc/crontab /etc/crontab.save.$$ && \
			if mv /etc/crontab.tmp.$$ /etc/crontab; then
				chmod --reference=/etc/crontab.save.$$ /etc/crontab && \
					rm -f /etc/crontab.save.$$
			else
				mv -f /etc/crontab.save.$$ /etc/crontab
			fi
	fi
fi