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