psacct: Use augeas to enable accounting on OpenBSD for Puppet 3.6 compatilibity

This commit is contained in:
Ossi Salmi 2015-12-02 01:34:40 +02:00
parent 2b9244c028
commit a4dbd79891

View file

@ -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",
}
}