From b6bc1d25b983895eb1c7de219131dd41ce9cabba Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 2 Apr 2002 16:03:04 +0000 Subject: Work on m4 for samba (unfinished). --- samba/cf.samba.m4 | 42 ++++++++++++++++++++++++++++++++++++ samba/smb-shares.m4 | 4 +++- samba/smb_thor.venture.local.conf.m4 | 13 +++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 samba/cf.samba.m4 create mode 100644 samba/smb_thor.venture.local.conf.m4 (limited to 'samba') diff --git a/samba/cf.samba.m4 b/samba/cf.samba.m4 new file mode 100644 index 0000000..48dc460 --- /dev/null +++ b/samba/cf.samba.m4 @@ -0,0 +1,42 @@ +dnl +dnl /etc/cfengine/cf.samba.m4 +dnl Copyright 2002 Jonas Smedegaard +dnl +dnl $Id: cf.samba.m4,v 1.1 2002-04-02 16:03:04 jonas Exp $ +dnl +dnl m4 skeleton file for Samba server cfengine cleanup file +dnl +define(_tab,` ')dnl +define(_dir,_tab$1 + mode=$2 + owner=$3 + group=$4 +)dnl +define(_nonshare,_dir($3,$6,$4,$5))dnl +define(_share_home,_dir($3,$6,$4,$5))dnl +define(_share_pc_wrr,_dir($3,$6,$4,$5))dnl +define(_share_pc_wwr,_dir($3,$6,$4,$5))dnl +define(_share_pc_www,_dir($3,$6,$4,$5))dnl +control: + AddInstallable = ( samba samba_reload netatalk netatalk_reload ) + + samba_reload:: + { /etc/samba/smb-shares-$(fqdn).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: +dnl include(smb_esyscmd(hostname -f).m4)dnl +include(smb_thor.venture.local.conf.m4)dnl + +processes: + "smbd" restart "/etc/init.d/samba restart" + +shellcommands: + samba_reload:: + "/etc/init.d/samba force-reload" diff --git a/samba/smb-shares.m4 b/samba/smb-shares.m4 index 5dc36bc..0cf86e4 100644 --- a/samba/smb-shares.m4 +++ b/samba/smb-shares.m4 @@ -2,7 +2,7 @@ dnl dnl /etc/samba/smb-shares.m4 dnl Copyright 2002 Jonas Smedegaard dnl -dnl $Id: smb-shares.m4,v 1.4 2002-03-20 20:06:46 jonas Exp $ +dnl $Id: smb-shares.m4,v 1.5 2002-04-02 16:03:04 jonas Exp $ dnl dnl m4 share definitions for generating Samba server smb.conf dnl @@ -90,3 +90,5 @@ define(_share_printer,[$1] printable = yes printer name = $4 )dnl +dnl include(smb_esyscmd(hostname -f).m4)dnl +include(smb_thor.venture.local.conf.m4)dnl diff --git a/samba/smb_thor.venture.local.conf.m4 b/samba/smb_thor.venture.local.conf.m4 new file mode 100644 index 0000000..264c428 --- /dev/null +++ b/samba/smb_thor.venture.local.conf.m4 @@ -0,0 +1,13 @@ +_nonshare(common,commonshare,/home/fsadmin/COMMON,fsadmin,fsadmin,755)dnl +_share_pc_wwr(soft,softshare,/home/fsadmin/COMMON/software,fsadmin,fsadmin,775)dnl +_share_home(homes,Personlige dokumenter,%H/.pcshare)) +_share_pc_wwr($(datashare),fsadmin,fsadmin,775)dnl +_share_pc_wwr(admin,Administration,/home/admin/admin,admin,admin,775)dnl +_share_pc_wwr(business,Business,/home/business/business,business,business,775)dnl +_share_pc_wwr(accounting,Accounting,/home/accounting/accounting,accounting,accounting,775)dnl +_share_pc_wwr(graphics,Graphics,/home/graphics/graphics,graphics,graphics,775)dnl +_share_pc_wwr(it,IT,/home/it/it,it,it,775)dnl +_share_pc_wwr(edu,Education,/home/edu/edu,edu,edu,775)dnl +_share_pc_wwr(service,Service,/home/service/service,service,service,775)dnl +_share_pc_wrr(netlogon,Network logon,/etc/samba/netlogon,root,root,755)dnl +_share_pc_www(profiles,Brugerprofiler,/home/fsadmin/COMMON/samba/userprofiles,fsadmin,fsadmin,777)dnl -- cgit v1.2.3