diff options
author | Jonas Smedegaard <dr@jones.dk> | 2002-08-06 13:26:01 +0000 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2002-08-06 13:26:01 +0000 |
commit | a1644e76086720fedf51ff7b9992dbd87f886512 (patch) | |
tree | 8f3ca75a9b1da427451711179f4a26ce9e6cc821 /cfengine | |
parent | 022397d4cc6583183d0a2f7f694b1b064d211d37 (diff) |
cfengine: complete m4-cfengine script.
Diffstat (limited to 'cfengine')
-rw-r--r-- | cfengine/cf.services.file.tmp.m4 | 20 | ||||
-rwxr-xr-x | cfengine/script.update_sambashares.sh | 9 |
2 files changed, 8 insertions, 21 deletions
diff --git a/cfengine/cf.services.file.tmp.m4 b/cfengine/cf.services.file.tmp.m4 index 732f746..72f94b2 100644 --- a/cfengine/cf.services.file.tmp.m4 +++ b/cfengine/cf.services.file.tmp.m4 @@ -2,7 +2,7 @@ ifelse(` /etc/cfengine/cf.services.file.tmp.m4 Copyright 2002 Jonas Smedegaard <dr@jones.dk> -$Id: cf.services.file.tmp.m4,v 1.2 2002-08-04 23:31:46 jonas Exp $ +$Id: cf.services.file.tmp.m4,v 1.3 2002-08-06 13:26:01 jonas Exp $ cfengine m4 skeleton file for cleaning up Samba and Netatalk shares @@ -40,26 +40,12 @@ define(_dir,_tab$2 group=$4 )dnl define(_homefiles,`')dnl +define(_printer,`')dnl define(_files,_dir($1,$4,$5,$6,$7))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 - } + actionsequence = ( directories ) directories: include(/etc/local-COMMON/file-FQDN.m4)dnl - -processes: - "smbd" restart "/etc/init.d/samba restart" - -shellcommands: - samba_reload:: - "/etc/init.d/samba force-reload" diff --git a/cfengine/script.update_sambashares.sh b/cfengine/script.update_sambashares.sh index 965abfb..e41d259 100755 --- a/cfengine/script.update_sambashares.sh +++ b/cfengine/script.update_sambashares.sh @@ -1,7 +1,8 @@ #!/bin/sh -echo "\$1: $1" -echo "\$2: $2" -echo "\$3: $3" - m4 -DFQDN=$(hostname -f) /etc/local-COMMON/samba/smb-shares.conf.m4 >> /etc/samba/smb-shares.conf + +cf_tmpfile=`tempfile -p cf` +m4 -DFQDN=$(hostname -f) /etc/local-COMMON/cfengine/cf.services.file.tmp.m4 > $cf_tmpfile +cfengine -q -f $cf_tmpfile +rm -f $cf_tmpfile |