From 9b2f2e28ebce9c3c881f078d62a15ff7be1c1769 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 15 Aug 2004 14:10:55 +0000 Subject: Match regexps must define complete lines. Some comments are space-less. --- squid/squid.cf | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/squid/squid.cf b/squid/squid.cf index 2c30f36..4a5fa7c 100755 --- a/squid/squid.cf +++ b/squid/squid.cf @@ -13,11 +13,11 @@ editfiles: # # maximum_object_size 64 MB # - WarnIfNoLineMatching "^(# )?maximum_object_size[[:blank:]]" - BeginGroupIfNoLineMatching "^(# )?maximum_object_size" + WarnIfNoLineMatching "^#? ?maximum_object_size[[:blank:]].*" + BeginGroupIfNoLineMatching "^#? ?maximum_object_size[[:blank:]].*" Append "maximum_object_size 64 MB # Added by CFengine $(date)" EndGroup - LocateLineMatching "^(# )?maximum_object_size" + LocateLineMatching "^#? ?maximum_object_size[[:blank:]].*" BeginGroupIfNoLineMatching "^[[:blank:]]*maximum_object_size[[:blank:]]+64 MB[[:blank:]]*(#.*)$" ReplaceLineWith "maximum_object_size 64 MB # Tweaked by CFengine $(date)" EndGroup @@ -25,11 +25,11 @@ editfiles: # cache_dir ufs /var/spool/squid 1000 16 256 # ResetSearch "1" - WarnIfNoLineMatching "^(# )?cache_dir[[:blank:]]" - BeginGroupIfNoLineMatching "^(# )?cache_dir[[:blank:]]" + WarnIfNoLineMatching "^#? ?cache_dir[[:blank:]].*" + BeginGroupIfNoLineMatching "^#? ?cache_dir[[:blank:]].*" Append "cache_dir ufs /var/spool/squid 1000 16 256 # Added by CFengine $(date)" EndGroup - LocateLineMatching "^(# )?cache_dir[[:blank:]]" + LocateLineMatching "^#? ?cache_dir[[:blank:]].*" BeginGroupIfNoLineMatching "^[[:blank:]]*cache_dir[[:blank:]]+ufs /var/spool/squid 1000 16 256[[:blank:]]*(#.*)$" ReplaceLineWith "cache_dir ufs /var/spool/squid 1000 16 256 # Tweaked by CFengine $(date)" EndGroup @@ -38,19 +38,19 @@ editfiles: # http_access allow our_networks # ResetSearch "1" - WarnIfNoLineMatching "^(# )?acl[[:blank:]]+our_networks[[:blank:]]+src[[:blank:]]" - BeginGroupIfNoLineMatching "^(# )?acl[[:blank:]]+our_networks[[:blank:]]+src[[:blank:]]" + WarnIfNoLineMatching "^#? ?acl[[:blank:]]+our_networks[[:blank:]]+src[[:blank:]].*" + BeginGroupIfNoLineMatching "^#? ?acl[[:blank:]]+our_networks[[:blank:]]+src[[:blank:]].*" Append "acl our_networks src 80.208.177.0/24 192.168.101.0/24 192.168.102.0/24 192.168.103.0/24 # Added by CFengine $(date)" EndGroup - LocateLineMatching "^(# )?acl[[:blank:]]+our_networks[[:blank:]]+src[[:blank:]]" + LocateLineMatching "^#? ?acl[[:blank:]]+our_networks[[:blank:]]+src[[:blank:]].*" BeginGroupIfNoLineMatching "^[[:blank:]]*acl[[:blank:]]+our_networks[[:blank:]]+src[[:blank:]]80.208.177.0/24 192.168.101.0/24 192.168.102.0/24 192.168.103.0/24[[:blank:]]*(#.*)$" ReplaceLineWith "acl our_networks src 80.208.177.0/24 192.168.101.0/24 192.168.102.0/24 192.168.103.0/24 # Tweaked by CFengine $(date)" EndGroup - WarnIfNoLineMatching "^(# )?http_access[[:blank:]]+allow[[:blank:]]+our_networks[[:blank:]]*(#.*)?$" - BeginGroupIfNoLineMatching "^(# )?http_access[[:blank:]]+allow[[:blank:]]+our_networks[[:blank:]]*(#.*)?$" + WarnIfNoLineMatching "^#? ?http_access[[:blank:]]+allow[[:blank:]]+our_networks[[:blank:]]*(#.*)?$" + BeginGroupIfNoLineMatching "^#? ?http_access[[:blank:]]+allow[[:blank:]]+our_networks[[:blank:]]*(#.*)?$" Append "http_access allow our_networks # Added by CFengine $(date)" EndGroup - LocateLineMatching "^(# )?http_access[[:blank:]]+allow[[:blank:]]+our_networks[[:blank:]]*(#.*)?$" + LocateLineMatching "^#? ?http_access[[:blank:]]+allow[[:blank:]]+our_networks[[:blank:]]*(#.*)?$" BeginGroupIfNoLineMatching "^http_access[[:blank:]]+allow[[:blank:]]+our_networks[[:blank:]]*(#.*)?$" ReplaceLineWith "acl our_networks src 192.168.0.0/16 # Tweaked by CFengine $(date)" EndGroup -- cgit v1.2.3