diff --git a/psacct/manifests/init.pp b/psacct/manifests/init.pp index 610921b..b8ea564 100644 --- a/psacct/manifests/init.pp +++ b/psacct/manifests/init.pp @@ -69,11 +69,6 @@ class psacct::openbsd { notify => Exec["accton"], } - service { "accounting": - enable => true, - require => File["/var/account/acct"], - } - exec { "accton": command => "accton /var/account/acct", path => "/bin:/usr/bin:/sbin:/usr/sbin", @@ -81,4 +76,10 @@ class psacct::openbsd { refreshonly => true, } + augeas { "enable-accounting": + context => "/files/etc/rc.conf.local", + changes => [ "ins 0 before 1", "set 0 accounting=YES" ], + onlyif => "match *[.='accounting=YES'] size == 0", + } + }