Sync usage with man page.
[netbsd-mini2440.git] / etc / rc.d / accounting
blob87da709f201fffd68fd6fa36d2202d85fc4d3fb9
1 #!/bin/sh
3 # $NetBSD: accounting,v 1.8 2004/08/13 18:08:03 mycroft Exp $
6 # PROVIDE: accounting
7 # REQUIRE: mountall
8 # BEFORE: DAEMON
9 # KEYWORD: shutdown
11 $_rc_subr_loaded . /etc/rc.subr
13 name="accounting"
14 rcvar=$name
15 accounting_command="/usr/sbin/accton"
16 accounting_file="/var/account/acct"
17 start_cmd="accounting_start"
18 stop_cmd="accounting_stop"
20 accounting_start()
22 if [ ! -f ${accounting_file} ]; then
23 echo "Creating accounting file ${accounting_file}"
24 ( umask 022 ; > ${accounting_file} )
26 echo "Turning on accounting."
27 ${accounting_command} ${accounting_file}
30 accounting_stop()
32 echo "Turning off accounting."
33 ${accounting_command}
36 load_rc_config $name
37 run_rc_command "$1"