From 93b4600f5022698787795d4e1d06cc51db73103c Mon Sep 17 00:00:00 2001 From: intrigeri Date: Sun, 17 Oct 2010 19:29:25 +0200 Subject: bugfixes --- manifests/faillog.pp | 26 +++++++++++++------------- manifests/init.pp | 2 ++ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/manifests/faillog.pp b/manifests/faillog.pp index 2af2299..2ec54c4 100644 --- a/manifests/faillog.pp +++ b/manifests/faillog.pp @@ -1,8 +1,8 @@ class loginrecords::faillog::enable { replace { 'loginrecords-faillog-enable': - file => $login_defs_file, - pattern => '^FAILLOG_ENAB\w+no$', - replace => 'FAILLOG_ENAB yes', + file => $login_defs_file, + pattern => '^FAILLOG_ENAB[[:space]]+no$', + replacement => 'FAILLOG_ENAB yes', } append_if_no_such_line { 'loginrecords-faillog-enable': file => $login_defs_file, @@ -12,14 +12,14 @@ class loginrecords::faillog::enable { } class loginrecords::faillog::disable { - replace { 'loginrecords-faillog-disable': - file => $login_defs_file, - pattern => '^FAILLOG_ENAB\w+yes$', - replace => 'FAILLOG_ENAB no', - } - append_if_no_such_line { 'loginrecords-faillog-disable': - file => $login_defs_file, - line => 'FAILLOG_ENAB no', - require => Replace['loginrecords-faillog-disable'], - } + replace { 'loginrecords-faillog-disable': + file => $login_defs_file, + pattern => '^FAILLOG_ENAB[[:space:]]+yes$', + replacement => 'FAILLOG_ENAB no', + } + append_if_no_such_line { 'loginrecords-faillog-disable': + file => $login_defs_file, + line => 'FAILLOG_ENAB no', + require => Replace['loginrecords-faillog-disable'], + } } diff --git a/manifests/init.pp b/manifests/init.pp index 2eddcb3..69b6d1b 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,3 +1,5 @@ +import "*.pp" + class loginrecords { # Default settings -- cgit v1.2.3