Home | History | Annotate | Line # | Download | only in rc.d
accounting revision 1.3
      1 #!/bin/sh
      2 #
      3 # $NetBSD: accounting,v 1.3 2000/09/19 13:04:38 lukem Exp $
      4 #
      5 
      6 # PROVIDE: accounting
      7 # REQUIRE: mountall
      8 
      9 . /etc/rc.subr
     10 
     11 name="accounting"
     12 rcvar=$name
     13 start_cmd="accounting_start"
     14 stop_cmd="accounting_stop"
     15 
     16 accounting_start()
     17 {
     18 	if [ -f /var/account/acct ]; then
     19 		echo "Turning on accounting."
     20 		/usr/sbin/accton /var/account/acct
     21 	fi
     22 }
     23 
     24 accounting_stop()
     25 {
     26 	echo "Turning off accounting."
     27 	/usr/sbin/accton
     28 }
     29 
     30 load_rc_config $name
     31 run_rc_command "$1"
     32