summaryrefslogtreecommitdiff
path: root/etc/rc
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2007-02-02 14:51:20 +0000
committerAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2007-02-02 14:51:20 +0000
commit2278e1922636c8293499ae8a3157af36a7c9d9e2 (patch)
treeb222c6635dc1279ef91a2905d5e2526bcfdeaa41 /etc/rc
parentc6d6db355f56d09fad81aa7555ffcc270ca79a8a (diff)
- add a new "accounting" variable (default to NO) to enable accouting
(if the file /var/account/acct does not exist it will be created) ok mk@
Diffstat (limited to 'etc/rc')
-rw-r--r--etc/rc7
1 files changed, 5 insertions, 2 deletions
diff --git a/etc/rc b/etc/rc
index 06f0463161d..d4bda2a1fd5 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,4 +1,4 @@
-# $OpenBSD: rc,v 1.297 2007/01/31 08:32:16 pyr Exp $
+# $OpenBSD: rc,v 1.298 2007/02/02 14:51:19 ajacoutot Exp $
# System startup script run by init on autoboot
# or after single-user.
@@ -496,7 +496,10 @@ if [ $? -eq 0 ]; then
rm -f $T
fi
-if [ -f /var/account/acct ]; then
+if [ X"${accounting}" = X"YES" ]; then
+ if [ ! -f /var/account/acct ]; then
+ touch /var/account/acct
+ fi
echo 'turning on accounting'; accton /var/account/acct
fi