diff options
Diffstat (limited to 'cfengine')
-rw-r--r-- | cfengine/cf.services.file | 110 |
1 files changed, 56 insertions, 54 deletions
diff --git a/cfengine/cf.services.file b/cfengine/cf.services.file index c1e336f..ad7652c 100644 --- a/cfengine/cf.services.file +++ b/cfengine/cf.services.file @@ -196,31 +196,7 @@ editfiles: EndGroup DefineClasses "samba_reload" } - lprng:: - { /etc/samba/smb.conf - # - # printing = lprng - # - LocateLineMatching "^[;[:blank:]]*æprinting[[:blank:]]*=.*" - BeginGroupIfNoLineMatching '^[[:blank:]]*printing[[:blank:]]*=[[:blank:]]*lprng[[:blank:]]*' - ReplaceLineWith ' printing = lprng' - EndGroup - CatchAbort - BeginGroupIfNoMatch '^[[:blank:]]*printing[[:blank:]]*=[[:blank:]]*lprng[[:blank:]]*' - InsertLine ' printing = lprng' - EndGroup - DefineClasses "samba_reload" - } - samba_reload:: - { /etc/samba/smb.conf - LocateLineMatching "^; EDITED BY CFENGINE .*" - ReplaceAll '; EDITED BY CFENGINE .*$' With '; EDITED BY CFENGINE $(date)' - CatchAbort - BeginGroupIfNoMatch "^; EDITED BY CFENGINE .*" - Append '; EDITED BY CFENGINE $(date)' - EndGroup - } - samba:: + { /etc/samba/smb-shares-COMMON.conf # # This file contains all the shares common to all installations. @@ -288,16 +264,7 @@ editfiles: EndGroup DefineClasses "samba_reload" } - samba_reload:: - { /etc/samba/smb-shares-COMMON.conf - LocateLineMatching "^; EDITED BY CFENGINE .*" - ReplaceAll '; EDITED BY CFENGINE .*$' With '; EDITED BY CFENGINE $(date)' - CatchAbort - BeginGroupIfNoMatch "^; EDITED BY CFENGINE .*" - Append '; EDITED BY CFENGINE $(date)' - EndGroup - } - samba:: + # # Local shares special for the site. # In this file you can define special shares that you need @@ -314,16 +281,7 @@ editfiles: EndGroup DefineClasses "samba_reload" } - samba_reload:: - { /etc/samba/smb-shares-$(site).conf - LocateLineMatching "^; EDITED BY CFENGINE .*" - ReplaceAll '; EDITED BY CFENGINE .*$' With '; EDITED BY CFENGINE $(date)' - CatchAbort - BeginGroupIfNoMatch "^; EDITED BY CFENGINE .*" - Append '; EDITED BY CFENGINE $(date)' - EndGroup - } - samba:: + { /etc/samba/smb-printers.conf # # This file contains all the printers defined in the Linux printing @@ -348,16 +306,23 @@ editfiles: Append ' printable = yes' EndGroup } - samba_reload:: - { /etc/samba/smb-printers.conf - LocateLineMatching "^; EDITED BY CFENGINE .*" - ReplaceAll '; EDITED BY CFENGINE .*$' With '; EDITED BY CFENGINE $(date)' - CatchAbort - BeginGroupIfNoMatch "^; EDITED BY CFENGINE .*" - Append '; EDITED BY CFENGINE $(date)' - EndGroup - } + lprng:: + { /etc/samba/smb.conf + # + # printing = lprng + # + LocateLineMatching "^[;[:blank:]]*æprinting[[:blank:]]*=.*" + BeginGroupIfNoLineMatching '^[[:blank:]]*printing[[:blank:]]*=[[:blank:]]*lprng[[:blank:]]*' + ReplaceLineWith ' printing = lprng' + EndGroup + CatchAbort + BeginGroupIfNoMatch '^[[:blank:]]*printing[[:blank:]]*=[[:blank:]]*lprng[[:blank:]]*' + InsertLine ' printing = lprng' + EndGroup + DefineClasses "samba_reload" + } + # # Printer configuration stuff # @@ -374,6 +339,43 @@ editfiles: DefineClasses "lprng_reload" } + samba_reload:: + { /etc/samba/smb.conf + LocateLineMatching "^; EDITED BY CFENGINE .*" + ReplaceAll '; EDITED BY CFENGINE .*$' With '; EDITED BY CFENGINE $(date)' + CatchAbort + BeginGroupIfNoMatch "^; EDITED BY CFENGINE .*" + Append '; EDITED BY CFENGINE $(date)' + EndGroup + } + + { /etc/samba/smb-shares-COMMON.conf + LocateLineMatching "^; EDITED BY CFENGINE .*" + ReplaceAll '; EDITED BY CFENGINE .*$' With '; EDITED BY CFENGINE $(date)' + CatchAbort + BeginGroupIfNoMatch "^; EDITED BY CFENGINE .*" + Append '; EDITED BY CFENGINE $(date)' + EndGroup + } + + { /etc/samba/smb-shares-$(site).conf + LocateLineMatching "^; EDITED BY CFENGINE .*" + ReplaceAll '; EDITED BY CFENGINE .*$' With '; EDITED BY CFENGINE $(date)' + CatchAbort + BeginGroupIfNoMatch "^; EDITED BY CFENGINE .*" + Append '; EDITED BY CFENGINE $(date)' + EndGroup + } + + { /etc/samba/smb-printers.conf + LocateLineMatching "^; EDITED BY CFENGINE .*" + ReplaceAll '; EDITED BY CFENGINE .*$' With '; EDITED BY CFENGINE $(date)' + CatchAbort + BeginGroupIfNoMatch "^; EDITED BY CFENGINE .*" + Append '; EDITED BY CFENGINE $(date)' + EndGroup + } + directories: any:: $(commonsharedir) |