From 15f0be0510d0483b17a6e6a2e1146e083b0f2977 Mon Sep 17 00:00:00 2001 From: Juri Jensen Date: Fri, 11 Jan 2002 11:15:32 +0000 Subject: cfengine: Moved some files due to the sitename change. Modified the shares definition file for xenuxlocal to reflect the new standard. --- dhcpd.conf.raatstof | 20 ---- dhcpd.conf.radio-raatstof | 20 ++++ printcap.raatstof | 15 --- printcap.radio-raatstof | 15 +++ samba/smb-shares-raatstof.conf | 145 --------------------------- samba/smb-shares-radio-raatstof.conf | 145 +++++++++++++++++++++++++++ samba/smb-shares-xenuxlocal.conf | 185 +++++++++++++++++++++++++++++++---- 7 files changed, 347 insertions(+), 198 deletions(-) delete mode 100644 dhcpd.conf.raatstof create mode 100644 dhcpd.conf.radio-raatstof delete mode 100644 printcap.raatstof create mode 100644 printcap.radio-raatstof delete mode 100644 samba/smb-shares-raatstof.conf create mode 100644 samba/smb-shares-radio-raatstof.conf diff --git a/dhcpd.conf.raatstof b/dhcpd.conf.raatstof deleted file mode 100644 index 15109fd..0000000 --- a/dhcpd.conf.raatstof +++ /dev/null @@ -1,20 +0,0 @@ -# dhcpd.conf -# -# DHCP configuration file for raatstof.local -# - -default-lease-time 1200; -max-lease-time 7200; - -option subnet-mask 255.255.255.0; -option routers 192.168.3.1; -option domain-name-servers 192.168.3.1, 212.54.64.170, 212.54.64.171; -option domain-name "raatstof.local"; -option netbios-name-servers 192.168.3.1; - -# According to our policy, the dynamic address space starts -# at .60 and ends at .229 giving 170 client addresses. -# (See "System Description --> Network Model") -subnet 192.168.3.0 netmask 255.255.255.0 { - range 192.168.3.60 192.168.3.229; -} diff --git a/dhcpd.conf.radio-raatstof b/dhcpd.conf.radio-raatstof new file mode 100644 index 0000000..15109fd --- /dev/null +++ b/dhcpd.conf.radio-raatstof @@ -0,0 +1,20 @@ +# dhcpd.conf +# +# DHCP configuration file for raatstof.local +# + +default-lease-time 1200; +max-lease-time 7200; + +option subnet-mask 255.255.255.0; +option routers 192.168.3.1; +option domain-name-servers 192.168.3.1, 212.54.64.170, 212.54.64.171; +option domain-name "raatstof.local"; +option netbios-name-servers 192.168.3.1; + +# According to our policy, the dynamic address space starts +# at .60 and ends at .229 giving 170 client addresses. +# (See "System Description --> Network Model") +subnet 192.168.3.0 netmask 255.255.255.0 { + range 192.168.3.60 192.168.3.229; +} diff --git a/printcap.raatstof b/printcap.raatstof deleted file mode 100644 index 692dad7..0000000 --- a/printcap.raatstof +++ /dev/null @@ -1,15 +0,0 @@ -lp|epson|Epson Stylus Color 720:\ - :lp=:\ - :sd=/var/spool/lpd/epson:\ - :rm=192.168.200.40:\ - :rp=POSTSCRIPT_P1:\ - :af=/var/log/lp-acct:\ - :lf=/var/log/lp-errs: - -lp1|xerox|Xerox:\ - :lp=:\ - :sd=/var/spool/lpd/xerox:\ - :rm=192.168.3.40:\ - :rp=TEXT_P1:\ - :af=/var/log/lp-acct:\ - :lf=/var/log/lp-errs: diff --git a/printcap.radio-raatstof b/printcap.radio-raatstof new file mode 100644 index 0000000..692dad7 --- /dev/null +++ b/printcap.radio-raatstof @@ -0,0 +1,15 @@ +lp|epson|Epson Stylus Color 720:\ + :lp=:\ + :sd=/var/spool/lpd/epson:\ + :rm=192.168.200.40:\ + :rp=POSTSCRIPT_P1:\ + :af=/var/log/lp-acct:\ + :lf=/var/log/lp-errs: + +lp1|xerox|Xerox:\ + :lp=:\ + :sd=/var/spool/lpd/xerox:\ + :rm=192.168.3.40:\ + :rp=TEXT_P1:\ + :af=/var/log/lp-acct:\ + :lf=/var/log/lp-errs: diff --git a/samba/smb-shares-raatstof.conf b/samba/smb-shares-raatstof.conf deleted file mode 100644 index 20bacdb..0000000 --- a/samba/smb-shares-raatstof.conf +++ /dev/null @@ -1,145 +0,0 @@ -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 ) -# printdir = ( /var/spool/lpd/sharedprinter ) - 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 - 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) - $(printdir) - mode=775 - owner=root - group=root - -processes: - "smbd" restart "/etc/init.d/samba restart" - -shellcommands: - samba_reload:: - "/etc/init.d/samba force-reload" diff --git a/samba/smb-shares-radio-raatstof.conf b/samba/smb-shares-radio-raatstof.conf new file mode 100644 index 0000000..be2b5f1 --- /dev/null +++ b/samba/smb-shares-radio-raatstof.conf @@ -0,0 +1,145 @@ +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 ) + printdir = ( /var/spool/lpd/sharedprinter ) + 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 + 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) + $(printdir) + mode=775 + owmer=root + group=root + +processes: + "smbd" restart "/etc/init.d/samba restart" + +shellcommands: + samba_reload:: + "/etc/init.d/samba force-reload" 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" -- cgit v1.2.3