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
12name="accounting"
13start_precmd="checkyesno accounting"
14start_cmd="accounting_start"
15stop_precmd=$start_precmd
16stop_cmd="accounting_stop"
17
18accounting_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
26accounting_stop()
27{
28	echo "Turning off accounting."
29	/usr/sbin/accton
30}
31
32run_rc_command "$1"
33