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