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