From 82d7395a2f49b6ef37c5ad7458e69c5fd6bafdc3 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 2 Apr 2002 06:14:09 +0000 Subject: harden: Simplify integrit a bit, and make sure additions are made even if the above fails (grrr). --- cfengine/cf.services.harden | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/cfengine/cf.services.harden b/cfengine/cf.services.harden index ae315b9..21f8bf1 100644 --- a/cfengine/cf.services.harden +++ b/cfengine/cf.services.harden @@ -119,21 +119,11 @@ editfiles: LocateLineMatching "^#[[:blank:]]*!/usr/src" ReplaceLineWith "!/usr/src" ResetSearch "1" - BeginGroupIfNoLineMatching "^!/initrc" - Append "!/initrc" - EndGroup - ResetSearch "1" - BeginGroupIfNoLineMatching "^!/.journal" - Append "!/.journal" - EndGroup - ResetSearch "1" - BeginGroupIfNoLineMatching "^!/usr/local" - Append "!/usr/local" - EndGroup - ResetSearch "1" - BeginGroupIfNoLineMatching "^!/usr/src" - Append "!/usr/src" - EndGroup + CatchAbort + AppendIfNoLineMatching "!/initrc" + AppendIfNoLineMatching "!/.journal" + AppendIfNoLineMatching "!/usr/local" + AppendIfNoLineMatching "!/usr/src" } # { /etc/cron.daily/integrit # # -- cgit v1.2.3