diff options
author | Juri Jensen <juri@xenux.dk> | 2002-01-11 11:15:32 +0000 |
---|---|---|
committer | Juri Jensen <juri@xenux.dk> | 2002-01-11 11:15:32 +0000 |
commit | 15f0be0510d0483b17a6e6a2e1146e083b0f2977 (patch) | |
tree | f8d71581846884717374871b015513906a4dc256 | |
parent | ae5f99da8ffd0af79ddd48e95e972cc2af9905ac (diff) |
cfengine: Moved some files due to the sitename change. Modified the
shares definition file for xenuxlocal to reflect the new standard.
-rw-r--r-- | dhcpd.conf.radio-raatstof (renamed from dhcpd.conf.raatstof) | 0 | ||||
-rw-r--r-- | printcap.radio-raatstof (renamed from printcap.raatstof) | 0 | ||||
-rw-r--r-- | samba/smb-shares-radio-raatstof.conf (renamed from samba/smb-shares-raatstof.conf) | 4 | ||||
-rw-r--r-- | samba/smb-shares-xenuxlocal.conf | 185 |
4 files changed, 169 insertions, 20 deletions
diff --git a/dhcpd.conf.raatstof b/dhcpd.conf.radio-raatstof index 15109fd..15109fd 100644 --- a/dhcpd.conf.raatstof +++ b/dhcpd.conf.radio-raatstof diff --git a/printcap.raatstof b/printcap.radio-raatstof index 692dad7..692dad7 100644 --- a/printcap.raatstof +++ b/printcap.radio-raatstof diff --git a/samba/smb-shares-raatstof.conf b/samba/smb-shares-radio-raatstof.conf index 20bacdb..be2b5f1 100644 --- a/samba/smb-shares-raatstof.conf +++ b/samba/smb-shares-radio-raatstof.conf @@ -15,7 +15,7 @@ control: datashare = ( /home/fsadmin/COMMON/documents ) softshare = ( /home/fsadmin/COMMON/software ) profshare = ( /home/fsadmin/COMMON/samba/userprofiles ) -# printdir = ( /var/spool/lpd/sharedprinter ) + printdir = ( /var/spool/lpd/sharedprinter ) privpcshare = ( .pcshare ) privmacshare = ( .macshare ) privxchngshare = ( .xchangeshare ) @@ -134,7 +134,7 @@ directories: group=$(admingrp) $(printdir) mode=775 - owner=root + owmer=root group=root processes: diff --git a/samba/smb-shares-xenuxlocal.conf b/samba/smb-shares-xenuxlocal.conf index 0a1c043..64d4de3 100644 --- a/samba/smb-shares-xenuxlocal.conf +++ b/samba/smb-shares-xenuxlocal.conf @@ -1,20 +1,169 @@ -[mp3] - comment = Mp3 filer - path = /home/jrisch/mp3 - public = no - valid users = @jrisch - force group = +jrisch - writable = yes - create mask = 0660 - directory mask = 0770 +control: + AddInstallable = ( samba samba_reload netatalk netatalk_reload lprng lprng_reload cups cups_reload ) + + # + # Variables for shares + # You can change the paths here and it will be changed both in + # the conf file and in the filesystem - But once it is implemented, + # it is not wise to change it - the data in the shares doesn't get + # moved! + # You can change the rights on the shares in the "directories:" + # section. + # + netlogshare = ( /etc/samba/netlogon ) + commonsharedir = ( /home/fsadmin/COMMON ) + datashare = ( /home/fsadmin/COMMON/documents ) + softshare = ( /home/fsadmin/COMMON/software ) + profshare = ( /home/fsadmin/COMMON/samba/userprofiles ) + privpcshare = ( .pcshare ) + privmacshare = ( .macshare ) + privxchngshare = ( .xchangeshare ) + + # + # Administrative user and group + # + adminuser = ( fsadmin ) + admingrp = ( fsadmin ) + +editfiles: + samba:: + { /etc/samba/smb-shares-$(site).conf + # + # This file contains the shares common to a site. + # We check if the proper sections are there and add them if they + # isn't. We don't check the file line for line. + # + AutoCreate + # + # [netlogon] + # + BeginGroupIfNoLineMatching "^\[netlogon\]" + Append '[netlogon]' + Append ' comment = Network logon' + Append ' path = $(netlogshare)' + Append ' browsable = no' + Append ' writeable = no' + Append ' share modes = no' + EndGroup + # + # [userprofiles] + # + BeginGroupIfNoLineMatching "^\[userprofiles\]" + Append '[userprofiles]' + Append ' path = $(profshare)' + Append ' force user = %u' + Append ' writable = yes' + Append ' browsable = no' + Append ' root preexec = /bin/mkdir $(profshare)/%U \' + Append ' /bin/chown %U $(profshare)/%U \' + Append ' /bin/chmod 700 $(profshare)/%U' + EndGroup + # + # [homes] + # + BeginGroupIfNoLineMatching "^\[homes\]" + Append '[homes]' + Append ' path = /home/%u/$(privpcshare)' + Append ' browsable = no' + Append ' root preexec = /bin/mkdir /home/%u/$(privpcshare) \' + Append ' /bin/chown %U /home/%u/$(privpcshare) \' + Append ' /bin/chmod 644 /home/%u/$(privpcshare)' + EndGroup + # + # [programmer] + # + BeginGroupIfNoLineMatching "^\[software\]" + Append '[software]' + Append ' path = $(softshare)' + Append ' comment = Fælles software' + Append ' browsable = yes' + Append ' guest ok = no' + Append ' writeable = yes' + Append ' valid users = @$(admingrp)' + Append ' force group = +$(admingrp)' + EndGroup + # + # [dokumenter] + # + BeginGroupIfNoLineMatching "^\[dokumenter\]" + Append '[dokumenter]' + Append ' path = $(datashare)' + Append ' comment = Fælles dokumenter' + Append ' browsable = yes' + Append ' guest ok = no' + Append ' writeable = yes' + Append ' valid users = @$(admingrp)' + Append ' force group = +$(admingrp)' + EndGroup + # + # [mp3] + # + BeginGroupIfNoLineMatching "^\[mp3\]" + Append '[mp3]' + Append ' comment = Mp3 filer' + Append ' path = /home/jrisch/mp3' + Append ' public = no' + Append ' valid users = @jrisch' + Append ' force group = +jrisch' + Append ' writable = yes' + Append ' create mask = 0660' + Append ' directory mask = 0770' + EndGroup + # + # [media] + # + BeginGroupIfNoLineMatching "^\[media\]" + Append '[media]' + Append ' comment = Mp3 filer, film, spil etc.' + Append ' path = /home/jrisch/media' + Append ' public = no' + Append ' valid users = @jrisch' + Append ' force group = +jrisch' + Append ' writable = yes' + Append ' create mask = 0660' + Append ' directory mask = 0770' + EndGroup -[media] - comment = Mp3 filer, film, spil etc. - path = /home/jrisch/media - public = no - valid users = @jrisch - force group = +jrisch - writable = yes - create mask = 0660 - directory mask = 0770 + 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 + } + +directories: + any:: + $(commonsharedir) + mode=755 + owner=$(adminuser) + group=$(admingrp) + $(softshare) + mode=775 + owner=$(adminuser) + group=$(admingrp) + $(datashare) + mode=775 + owner=$(adminuser) + group=$(admingrp) + samba:: + $(netlogshare) + mode=755 + owner=root + group=root + $(profshare) + mode=775 + owner=$(adminuser) + group=$(admingrp) + +processes: + "smbd" restart "/etc/init.d/samba restart" + +shellcommands: + samba_reload:: + "/etc/init.d/samba force-reload" |