diff options
Diffstat (limited to 'cfengine/cf.services.file')
-rw-r--r-- | cfengine/cf.services.file | 51 |
1 files changed, 32 insertions, 19 deletions
diff --git a/cfengine/cf.services.file b/cfengine/cf.services.file index 13b2583..883a129 100644 --- a/cfengine/cf.services.file +++ b/cfengine/cf.services.file @@ -13,8 +13,8 @@ control: netlogshare = ( /etc/samba/netlogon ) commonsharedir = ( /var/local/filesharing/COMMON ) locsharedir = ( /var/local/filesharing/local ) - datashare = ( /var/local/filesharing/COMMON/data ) - pgrshare = ( /var/local/filesharing/COMMON/programs ) + datashare = ( /var/local/filesharing/COMMON/documents ) + pgrshare = ( /var/local/filesharing/COMMON/software ) profshare = ( /var/local/filesharing/COMMON/samba/userprofiles ) printdir = ( /var/spool/samba ) @@ -296,6 +296,32 @@ editfiles: EndGroup } samba:: + # + # Local shares special for the site. + # In this file you can define special shares that you need + # + { /etc/samba/smb-shares-$(site).conf + # + # We don't make this file dynamically, but instead we copy the contents + # of a master file, but only if it's newer than the one installed. + # + BeginGroupIfFileIsNewer "/etc/local-COMMON/samba/smb-shares-$(site).conf" + EmptyEntireFilePlease + InsertFile "/etc/local-COMMON/samba/smb-shares-$(site).conf" + Append "# Edited by cfengine $(date)" + 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 @@ -329,23 +355,6 @@ editfiles: Append '; EDITED BY CFENGINE $(date)' EndGroup } - samba:: - # - # Local shares special for the site. - # In this file you can define special shares that you need - # - { /etc/samba/smb-shares-$(site).conf - # - # We don't make this file dynamically, but instead we copy the contents - # of a master file, but only if it's newer than the one installed. - # - BeginGroupIfFileIsNewer "/etc/local-$(host).$(domain)/samba/smb-shares-$(site).conf" - EmptyEntireFilePlease - InsertFile "/etc/local-$(host).$(domain)/samba/smb-shares-$(site).conf" - Append "# Edited by cfengine $(date)" - EndGroup - DefineClasses "lprng_reload" - } lprng:: # # Printer configuration stuff @@ -369,6 +378,10 @@ directories: mode=755 owner=root group=root + $(locsharedir) + mode=775 + owner=root + group=root $(pgrshare) mode=775 owner=root |