#!/bin/bash

# Source function library.
. /etc/init.d/functions

[ -f /sbin/lkstlogd ] || exit 0

# Source config
if [ -f /etc/sysconfig/lkstlogd ] ; then
	. /etc/sysconfig/lkstlogd
else
	LKSTLOGDOPTION=""
fi

RETVAL=0

umask 077

start() {
 	echo -n $"Starting linux kernel state tracer: "
	daemon lkstlogd $LKSTLOGDOPTION
	RETVAL=$?
	return $RETVAL
}	
stop() {
	echo -n $"Shutting down linux kernel state tracer: "
	killproc lkstlogd
	RETVAL=$?
	return $RETVAL
}
rhstatus() {
	status lkstlogd
}
restart() {
	stop
	start
}	

case "$1" in
  start)
  	start
	;;
  stop)
  	stop
	;;
  status)
  	rhstatus
	;;
  restart|reload)
  	restart
	;;
  condrestart)
  	restart
	;;
  *)
	echo $"Usage: $0 {start|stop|status|restart|condrestart}"
	exit 1
esac

exit $?

