From 4d3e47221f160723d38f31e072e61a3c6908c9ce Mon Sep 17 00:00:00 2001 From: ajacoutot <> Date: Fri, 2 Feb 2007 14:51:19 +0000 Subject: [PATCH] - 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@ --- src/etc/rc | 7 +++++-- src/etc/rc.conf | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/etc/rc b/src/etc/rc index 06f04631..d4bda2a1 100644 --- a/src/etc/rc +++ b/src/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 diff --git a/src/etc/rc.conf b/src/etc/rc.conf index a07a34a6..c35597a8 100644 --- a/src/etc/rc.conf +++ b/src/etc/rc.conf @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: rc.conf,v 1.120 2007/01/31 08:32:16 pyr Exp $ +# $OpenBSD: rc.conf,v 1.121 2007/02/02 14:51:19 ajacoutot Exp $ # set these to "NO" to turn them off. otherwise, they're used as flags routed_flags=NO # for normal use: "-q" @@ -71,6 +71,7 @@ ipsec=NO # IPsec portmap=NO # Note: inetd(8) rpc services need portmap too inetd=YES # almost always needed check_quotas=YES # NO may be desirable in some YP environments +accounting=NO # process accounting (using /var/account/acct) krb5_master_kdc=NO # KerberosV master KDC. Run 'info heimdal' for help. krb5_slave_kdc=NO # KerberosV slave KDC.