Deleted Added
full compact
accounting (136224) accounting (165664)
1#!/bin/sh
2#
3# $NetBSD: accounting,v 1.7 2002/03/22 04:33:57 thorpej Exp $
1#!/bin/sh
2#
3# $NetBSD: accounting,v 1.7 2002/03/22 04:33:57 thorpej Exp $
4# $FreeBSD: head/etc/rc.d/accounting 136224 2004-10-07 13:55:26Z mtm $
4# $FreeBSD: head/etc/rc.d/accounting 165664 2006-12-30 22:53:20Z yar $
5#
6
7# PROVIDE: accounting
8# REQUIRE: mountcritremote
9# BEFORE: DAEMON
10# KEYWORD: nojail
11
12. /etc/rc.subr
13
14name="accounting"
15rcvar=`set_rcvar`
16accounting_command="/usr/sbin/accton"
17accounting_file="/var/account/acct"
18start_cmd="accounting_start"
19stop_cmd="accounting_stop"
20
21accounting_start()
22{
5#
6
7# PROVIDE: accounting
8# REQUIRE: mountcritremote
9# BEFORE: DAEMON
10# KEYWORD: nojail
11
12. /etc/rc.subr
13
14name="accounting"
15rcvar=`set_rcvar`
16accounting_command="/usr/sbin/accton"
17accounting_file="/var/account/acct"
18start_cmd="accounting_start"
19stop_cmd="accounting_stop"
20
21accounting_start()
22{
23 local _dir
24
23 _dir=`dirname "$accounting_file"`
24 if [ ! -d `dirname "$_dir"` ]; then
25 if ! mkdir -p "$_dir"; then
26 warn "Could not create $_dir."
27 return 1
28 fi
29 fi
30 if [ ! -e "$accounting_file" ]; then

--- 19 unchanged lines hidden ---
25 _dir=`dirname "$accounting_file"`
26 if [ ! -d `dirname "$_dir"` ]; then
27 if ! mkdir -p "$_dir"; then
28 warn "Could not create $_dir."
29 return 1
30 fi
31 fi
32 if [ ! -e "$accounting_file" ]; then

--- 19 unchanged lines hidden ---