Deleted Added
full compact
accounting (218961) accounting (218986)
1#!/bin/sh
2#
1#!/bin/sh
2#
3# $FreeBSD: head/etc/rc.d/accounting 218961 2011-02-22 21:13:40Z dougb $
3# $FreeBSD: head/etc/rc.d/accounting 218986 2011-02-24 06:28:48Z dougb $
4#
5
6# PROVIDE: accounting
7# REQUIRE: mountcritremote
8# BEFORE: DAEMON
9# KEYWORD: nojail
10
11. /etc/rc.subr

--- 41 unchanged lines hidden (view full) ---

53{
54 local _dir _file
55
56 _dir="${accounting_file%/*}"
57 cd $_dir
58
59 if checkyesno accounting_enable; then
60 _file=`mktemp newacct-XXXXX`
4#
5
6# PROVIDE: accounting
7# REQUIRE: mountcritremote
8# BEFORE: DAEMON
9# KEYWORD: nojail
10
11. /etc/rc.subr

--- 41 unchanged lines hidden (view full) ---

53{
54 local _dir _file
55
56 _dir="${accounting_file%/*}"
57 cd $_dir
58
59 if checkyesno accounting_enable; then
60 _file=`mktemp newacct-XXXXX`
61 chmod 644 $_file
61 ${accounting_command} ${_dir}/${_file}
62 fi
63
64 mv ${accounting_file} ${accounting_file}.0
65
66 if checkyesno accounting_enable; then
67 ln $_file ${accounting_file##*/}
68 ${accounting_command} ${accounting_file}
69 unlink $_file
70 fi
71}
72
73load_rc_config $name
74run_rc_command "$1"
62 ${accounting_command} ${_dir}/${_file}
63 fi
64
65 mv ${accounting_file} ${accounting_file}.0
66
67 if checkyesno accounting_enable; then
68 ln $_file ${accounting_file##*/}
69 ${accounting_command} ${accounting_file}
70 unlink $_file
71 fi
72}
73
74load_rc_config $name
75run_rc_command "$1"