File sysstat.init.suse of Package sysstat
#! /bin/sh
# Copyright (c) 2000-2009 SuSE GmbH Nuernberg, Germany.
#
# /etc/init.d/boot.sysstat
#
### BEGIN INIT INFO
# Provides: boot.sysstat
# Required-Start: boot.rootfsck boot.cleanup boot.clock
# Should-Start: $local_fs $remote_fs
# Required-Stop: boot.rootfsck boot.cleanup
# Should-Stop: $local_fs $remote_fs
# Default-Start: B
# Default-Stop: $null
# Short-Description: Write information about system start to sysstat log
# Description: Write information about system start to sysstat log
### END INIT INFO
. /etc/rc.status
rc_reset
case "$1" in
start)
echo "Running sadc"
/usr/lib/sa/sa1 --boot 1>/dev/null 2>&1 && ln -fs /etc/sysstat/sysstat.cron /etc/cron.d/sysstat || rc_failed 1
rc_status -v
;;
stop)
echo "Removing sysstat's crontab"
/bin/rm -f /etc/cron.d/sysstat
rc_status -v
;;
check|status)
echo -n "Checking for service sysstat: "
test -L /etc/cron.d/sysstat && test "`readlink /etc/cron.d/sysstat`" == /etc/sysstat/sysstat.cron || rc_failed 3
rc_status -v
;;
restart|reload|probe)
rc_failed 3
;;
*)
echo "Usage: $0 {start|stop|status}"
exit 1
;;
esac
rc_exit