From 24c0218ff1fc8a33726cbe8371b1a3377330a2c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Thu, 8 Mar 2012 09:16:48 +0200 Subject: [PATCH] Fixed psacct module for Ubuntu. --- psacct/manifests/init.pp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/psacct/manifests/init.pp b/psacct/manifests/init.pp index 2c91375..09ec195 100644 --- a/psacct/manifests/init.pp +++ b/psacct/manifests/init.pp @@ -3,15 +3,15 @@ # class psacct { - case $operatingsystem { - fedora,centos: { + case $kernel { + linux: { include psacct::linux } openbsd: { include psacct::openbsd } default: { - fail("psacct module not supported in ${operatingsystem}") + fail("psacct module not supported in ${kernel}") } } @@ -23,10 +23,18 @@ class psacct { class psacct::linux { package { "psacct": + name => $operatingsystem ? { + ubuntu => "acct", + default => "psacct", + }, ensure => installed, } service { "psacct": + name => $operatingsystem ? { + ubuntu => "acct", + default => "psacct", + }, ensure => running, enable => true, hasstatus => true,