#! /bin/sh
#
# sysstat	Reset the system activity logs
# 
# chkconfig: 12345 01 99
# description: Reset the system activity logs
# Author: Klaus.Franken@fth2.siemens.de
# Die Okt 12 10:05:41 EDT 1999
#
# Modified by:
# 1999/11/07 - Sebastien Godard <sebastien.godard@wanadoo.fr>
#	Now use '-d' option when starting sar.
# 2000/01/22 - Sebastien Godard <sebastien.godard@wanadoo.fr>
#	Rewritten from scratch. Call sadc instead of sar.
# 2004/01/22 - Nils Philippsen <nphilipp@redhat.com>
#   Adapt for chkconfig. Call only once after booting.
# 2004/02/18 - Nils Philippsen <nphilipp@redhat.com>
#   Return real retval

#
# /etc/rc.d/init.d/sysstat
#

RETVAL=0

# See how we were called.
case "$1" in
  start)
        if [ ! -f /var/lock/subsys/sysstat ]; then
            echo -n "Calling the system activity data collector (sadc): "
            /usr/lib64/sa/sadc -F -L - && touch /var/lock/subsys/sysstat
			RETVAL=$?
            echo
		fi
        ;;
  stop|status|restart|reload)
        ;;
  *)
        echo "Usage: sysstat {start|stop|status|restart|reload}"
        exit 1
esac
exit $RETVAL
