aboutsummaryrefslogtreecommitdiff
path: root/manifests/utmp
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-12-09 18:20:38 +0100
committermh <mh@immerda.ch>2010-12-09 18:24:50 +0100
commit87ac7825be98a2c9b2dc3d3dcf9e277ec2a364e9 (patch)
tree60a544ed7fc652282e150d293c80ca09976b1b74 /manifests/utmp
parentc565f2877738b279d51ffb64e034e088785dca77 (diff)
downloadpuppet-loginrecords-87ac7825be98a2c9b2dc3d3dcf9e277ec2a364e9.tar.gz
puppet-loginrecords-87ac7825be98a2c9b2dc3d3dcf9e277ec2a364e9.tar.bz2
finish refactoring
refactor everything towards class parameters and also add enable class for lastlog
Diffstat (limited to 'manifests/utmp')
-rw-r--r--manifests/utmp/disable.pp6
-rw-r--r--manifests/utmp/enable.pp11
2 files changed, 11 insertions, 6 deletions
diff --git a/manifests/utmp/disable.pp b/manifests/utmp/disable.pp
index 8d9145a..5b4ce07 100644
--- a/manifests/utmp/disable.pp
+++ b/manifests/utmp/disable.pp
@@ -1,3 +1,5 @@
-class loginrecords::utmp::disable {
- file { "$utmp_file": ensure => 'absent' }
+class loginrecords::utmp::disable inherits loginrecords::utmp::enable {
+ File[$utmp_file]{
+ ensure => 'absent'
+ }
}
diff --git a/manifests/utmp/enable.pp b/manifests/utmp/enable.pp
index 81e58ec..ee47b94 100644
--- a/manifests/utmp/enable.pp
+++ b/manifests/utmp/enable.pp
@@ -1,5 +1,8 @@
-class loginrecords::utmp::enable {
- file { "$utmp_file":
- ensure => 'present', mode => 660, owner => 'root', group => 'utmp',
- }
+class loginrecords::utmp::enable(
+ $utmp_file = '/var/run/utmp'
+){
+ file {$utmp_file:
+ ensure => 'present',
+ owner => 'root', group => 'utmp', mode => 660;
+ }
}