summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cfengine/cf.generic1
-rw-r--r--cfengine/cf.groups.jones3
-rw-r--r--cfengine/cf.services.file54
-rw-r--r--cfengine/cf.services.web33
-rw-r--r--cfengine/cf.site2
-rw-r--r--cfengine/cf.site.jones4
-rw-r--r--file-artax.107b.dk.m425
-rw-r--r--samba/netlogon/logon-lab.bat6
8 files changed, 98 insertions, 30 deletions
diff --git a/cfengine/cf.generic b/cfengine/cf.generic
index c05cf6c..23f5230 100644
--- a/cfengine/cf.generic
+++ b/cfengine/cf.generic
@@ -57,7 +57,6 @@ control:
directories
copy
tidy
- shellcommands.shares
shellcommands
links
processes
diff --git a/cfengine/cf.groups.jones b/cfengine/cf.groups.jones
index 6f0012a..6e2151e 100644
--- a/cfengine/cf.groups.jones
+++ b/cfengine/cf.groups.jones
@@ -2,7 +2,7 @@
# NB! Avoid adding new groups! We pollute the namespace already...
#
groups:
- jones = ( auryn fuchur xayide argax slamuf ror artax )
+ jones = ( auryn fuchur xayide argax slamuf ror )
pierre = ( pierre )
rornaestved = ( rornaestved )
satsbutikken = ( satsbutikken )
@@ -14,6 +14,7 @@ groups:
haakansson = ( tulle )
peronard = ( paf )
louiz = ( saks )
+ lab = ( artax )
Standalone_jones = ( auryn fuchur paf )
WWWServer_jones = ( auryn fuchur xayide argax slamuf pierre cafe3 ror wetware rornaestved satsbutikken ida jawa woody mail2 web tulle gmork paf artax saks )
diff --git a/cfengine/cf.services.file b/cfengine/cf.services.file
index d3b6e21..bf7ae59 100644
--- a/cfengine/cf.services.file
+++ b/cfengine/cf.services.file
@@ -1,6 +1,6 @@
control:
- AddInstallable = ( samba samba_reload samba_rebuild_shares netatalk netatalk_reload netatalk_rebuild_shares lprng lprng_reload cups cups_reload )
-
+ AddInstallable = ( samba samba_reload netatalk netatalk_reload lprng lprng_reload cups cups_reload )
+
classes:
#
# Determine if this is a samba server, netatalk server or both, and define
@@ -8,14 +8,14 @@ classes:
#
samba = ( `/usr/bin/test -x /usr/sbin/smbd` )
netatalk = ( `/usr/bin/test -x /usr/sbin/afpd` )
-
+
#
# Determine which print system is in use, and define classes based on that.
# We only support lprng and cups
#
lprng = ( `/usr/bin/test -x /usr/sbin/lpd` )
cups = ( `/usr/bin/test -x /usr/sbin/cupsd` )
-
+
editfiles:
samba.lprng::
{ /etc/samba/smb.conf
@@ -25,7 +25,7 @@ editfiles:
{ /etc/samba/smb.conf
AppendIfNoSuchLine "include = /etc/samba/smb-printers-cups.conf"
}
-
+
samba::
{ /etc/samba/smb.conf
#
@@ -108,15 +108,15 @@ editfiles:
InsertLine ' logon drive = Z:'
EndGroup
#
- # logon script = logon-$(site).bat
+ # logon script = logon-$(fqhost).bat
#
LocateLineMatching "^[;[:blank:]]*logon script[[:blank:]]*=.*"
- BeginGroupIfNoLineMatching "^[[:blank:]]*logon script[[:blank:]]*=[[:blank:]]*logon-$(site).bat[[:blank:]]*"
- ReplaceLineWith ' logon script = logon-$(site).bat'
+ BeginGroupIfNoLineMatching "^[[:blank:]]*logon script[[:blank:]]*=[[:blank:]]*logon-$(fqhost).bat[[:blank:]]*"
+ ReplaceLineWith ' logon script = logon-$(fqhost).bat'
EndGroup
CatchAbort
- BeginGroupIfNoMatch "^[[:blank:]]*logon script[[:blank:]]*=[[:blank:]]*logon-$(site).bat[[:blank:]]*"
- InsertLine ' logon script = logon-$(site).bat'
+ BeginGroupIfNoMatch "^[[:blank:]]*logon script[[:blank:]]*=[[:blank:]]*logon-$(fqhost).bat[[:blank:]]*"
+ InsertLine ' logon script = logon-$(fqhost).bat'
EndGroup
#
# domain logons = yes
@@ -184,30 +184,33 @@ editfiles:
#
# Batch file for mounting shares automatically
#
- { /etc/samba/netlogon/logon-$(site).bat
+ { /etc/samba/netlogon/logon-$(fqhost).bat
#
# 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/netlogon/logon-$(site).bat"
- AutoCreate
+ AutoCreate
+ BeginGroupIfFileIsNewer "/etc/local-COMMON/samba/netlogon/logon-$(fqhost).bat"
EmptyEntireFilePlease
- InsertFile "/etc/local-COMMON/samba/netlogon/logon-$(site).bat"
- Append "rem Edited by cfengine $(date)"
- FixEndOfLine "dos"
+ SetLine "rem DO NOT EDIT - auto-created by cfengine $(date)"
+ PrependIfNoLineMatching "^rem .* cfengine .*"
+ InsertFile "/etc/local-COMMON/samba/netlogon/logon-$(fqhost).bat"
EndGroup
- DefineClasses "samba_reload"
+ FixEndOfLine "dos"
}
#
# Check if the shares definitions have changed
#
{ /etc/samba/smb-shares.conf
- SetScript "m4 -DFQDN=$(fqhost) /etc/local-COMMON/samba/smb-shares.conf.m4 > /etc/samba/smb-shares.conf"
+ AutoCreate
BeginGroupIfFileIsNewer "/etc/local-COMMON/file-$(fqhost).m4"
- RunScript
+ EmptyEntireFilePlease
+ SetLine "# DO NOT EDIT - auto-created by cfengine $(date)"
+ PrependIfNoLineMatching "^# .* cfengine .*"
+# RunScript "/usr/bin/m4 -DFQDN=$(fqhost) /etc/local-COMMON/samba/smb-shares.conf.m4 >> /etc/samba/smb-shares.conf"
EndGroup
- DefineClasses "samba_rebuild_shares:samba_reload"
+ DefineClasses "samba_reload"
}
lprng::
@@ -219,10 +222,11 @@ editfiles:
# We don't make the printcap 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/printcap.$(site)"
+ BeginGroupIfFileIsNewer "/etc/local-COMMON/printcap.$(fqhost)"
+ SetLine "# DO NOT EDIT - auto-created by cfengine $(date)"
+ PrependIfNoLineMatching "^# .* cfengine .*"
EmptyEntireFilePlease
- InsertFile "/etc/local-COMMON/printcap.$(site)"
- Append "# Edited by cfengine $(date)"
+ InsertFile "/etc/local-COMMON/printcap.$(fqhost)"
EndGroup
DefineClasses "lprng_reload"
}
@@ -241,10 +245,6 @@ processes:
"smbd" restart "/etc/init.d/samba restart"
"afpd" restart "/etc/init.d/netatalk restart"
-shellcommands.shares:
- samba_rebuild_shares::
- "m4 -DFQDN=$(fqhost) /etc/local-COMMON/samba/smb-shares.conf.m4 > /etc/samba/smb-shares.conf"
-
shellcommands:
samba_reload::
"/etc/init.d/samba force-reload"
diff --git a/cfengine/cf.services.web b/cfengine/cf.services.web
index c0510e4..c67f141 100644
--- a/cfengine/cf.services.web
+++ b/cfengine/cf.services.web
@@ -309,6 +309,39 @@ editfiles:
EndGroup
UnsetAbort "^# END CFENGINE$"
EndGroup
+ #
+ # LoadModule authshadow_module /usr/lib/apache/1.3/mod_xslt.so
+ #
+ # <IfModule mod_auth_shadow.c>
+ # <Location /xslt>
+ # AddHandler mod_xslt .html
+ # AddHandler mod_xslt .txt
+ # </Location>
+ # </IfModule>
+ #
+ BeginGroupIfFileExists "/usr/lib/apache/1.3/mod_auth_shadow.so"
+ ResetSearch "1"
+# bug! UnCommentLinesMatching "^#[[:blank:]]*LoadModule[[:blank:]]+authshadow_module[[:blank:]].*"
+ LocateLineMatching "^#[[:blank:]]*LoadModule[[:blank:]]+authshadow_module[[:blank:]]+/usr/lib/apache/1.3/mod_auth_shadow.so$"
+ ReplaceLineWith "LoadModule authshadow_module /usr/lib/apache/1.3/mod_auth_shadow.so"
+ CatchAbort
+ AbortAtLineMatching "^# END CFENGINE$"
+ LocateLineMatching "^# BEGIN CFENGINE$"
+ BeginGroupIfNoSuchLine "<IfModule mod_auth_shadow.c>"
+ InsertLine "<IfModule mod_auth_shadow.c>"
+ InsertLine " <Location />"
+ InsertLine " </Location>"
+ InsertLine "</IfModule>"
+ EndGroup
+ ResetSearch "1"
+ LocateLineMatching "^# BEGIN CFENGINE$"
+ LocateLineMatching "^<IfModule mod_auth_shadow.c>$"
+ LocateLineMatching "[[:blank:]]+<Location />"
+ BeginGroupIfNoLineMatching "[[:blank:]]+AuthShadow Off"
+ InsertLine " AuthShadow Off"
+ EndGroup
+ UnsetAbort "^# END CFENGINE$"
+ EndGroup
}
processes:
"apache" restart "/etc/init.d/apache restart"
diff --git a/cfengine/cf.site b/cfengine/cf.site
index feb3873..36711a1 100644
--- a/cfengine/cf.site
+++ b/cfengine/cf.site
@@ -1,5 +1,5 @@
import:
- jones|homebase|pierre|rornaestved|satsbutikken|ida|shared|adamatic|cafe3|haakansson|peronard|louiz::
+ jones|homebase|pierre|rornaestved|satsbutikken|ida|shared|adamatic|cafe3|haakansson|peronard|louiz|lab::
$(cfroot)/cf.site.jones
xenux|xenuxlocal|raps|sagahus|venture|ntiexpo::
$(cfroot)/cf.site.xenux
diff --git a/cfengine/cf.site.jones b/cfengine/cf.site.jones
index b95d63c..931e15a 100644
--- a/cfengine/cf.site.jones
+++ b/cfengine/cf.site.jones
@@ -63,6 +63,10 @@ control:
site = ( louiz )
domain = ( louiz.dk )
sysadm = ( hostmaster@louiz.dk )
+ lab::
+ site = ( lab )
+ domain = ( 107b.dk )
+ sysadm = ( dr@jones.dk )
timezone = ( MET CET )
diff --git a/file-artax.107b.dk.m4 b/file-artax.107b.dk.m4
new file mode 100644
index 0000000..6d493eb
--- /dev/null
+++ b/file-artax.107b.dk.m4
@@ -0,0 +1,25 @@
+dnl
+dnl /etc/local/file-saks.louiz.dk.m4
+dnl Copyright 2002 Jonas Smedegaard <dr@jones.dk>
+dnl
+dnl $Id: file-artax.107b.dk.m4,v 1.1 2002-06-13 09:58:58 jonas Exp $
+dnl
+dnl Samba shares for Homebase Samba and Netatalk servers
+dnl
+dnl Used by /etc/cfengine/cf.local.services.file.conf.m4 and /etc/samba/smb-shares.m4
+dnl
+_dir(any,/home/fsadmin/COMMON,fsadmin,fsadmin,755)
+_files(win,netlogon,Netværkslogon,/etc/samba/netlogon,root,root,755,ro)
+_files(win,userprofiles,Brugerprofiler,/home/fsadmin/COMMON/samba/userprofiles,root,root,755,ro)
+_files(win,reference,Jones: Samba Linux server,/home/fsadmin/COMMON/C/reference)
+dnl
+_homefiles(win,homes,Personlige dokumenter,%H/pc)
+_homefiles(mac,home_mac,Personlige Macintosh-dokumenter,%H/mac,ro)
+_homefiles(win,home_web,Personlige web-dokumenter,%H/public_html)
+dnl
+_files(win,software,Fælles softshare,/home/fsadmin/COMMON/software,fsadmin,fsadmin,775,rw,fsadmin)
+_files(win,dokumenter,Fælles drev for delte filer,/home/fsadmin/COMMON/documents,fsadmin,fsadmin,775,rw,fsadmin)
+_files(win,admin,Dokumentation og adminværktøjer,/home/fsadmin/COMMON/admin,fsadmin,fsadmin,755,ro)
+_files(win,pdfshare,PDF Printdir,/home/fsadmin/COMMON/pdfshare,fsadmin,fsadmin,755,rw,fsadmin)
+dnl
+_printer(win,laser,Apple LaserWriter 16/600 PS,/tmp,lp)
diff --git a/samba/netlogon/logon-lab.bat b/samba/netlogon/logon-lab.bat
new file mode 100644
index 0000000..c672340
--- /dev/null
+++ b/samba/netlogon/logon-lab.bat
@@ -0,0 +1,6 @@
+rem [Global] commands
+NET TIME \\baal /SET /YES
+NET USE W: \\baal\dokumenter /YES
+NET USE X: \\baal\homes /YES
+NET USE Y: \\baal\software /YES
+ \ No newline at end of file