summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cfengine/cf.services.dhcp14
-rw-r--r--cfengine/cf.services.dns8
2 files changed, 13 insertions, 9 deletions
diff --git a/cfengine/cf.services.dhcp b/cfengine/cf.services.dhcp
index a4e78d2..695ebf0 100644
--- a/cfengine/cf.services.dhcp
+++ b/cfengine/cf.services.dhcp
@@ -18,13 +18,15 @@ editfiles:
# We don't make the dhcp.conf 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/dhcpd.conf.$(site)"
- AutoCreate
- EmptyEntireFilePlease
- InsertFile "/etc/local-COMMON/dhcpd.conf.$(site)"
- Append "# Edited by cfengine $(date)"
+ BeginGroupIfFileExists "/etc/local-COMMON/dhcpd.conf.$(site)"
+ BeginGroupIfFileIsNewer "/etc/local-COMMON/dhcpd.conf.$(site)"
+ AutoCreate
+ EmptyEntireFilePlease
+ InsertFile "/etc/local-COMMON/dhcpd.conf.$(site)"
+ Append "# Edited by cfengine $(date)"
+ EndGroup
+ DefineClasses "dhcpd_reload"
EndGroup
- DefineClasses "dhcpd_reload"
}
processes:
diff --git a/cfengine/cf.services.dns b/cfengine/cf.services.dns
index ce72883..9bced58 100644
--- a/cfengine/cf.services.dns
+++ b/cfengine/cf.services.dns
@@ -30,11 +30,13 @@ editfiles:
# Append " category statistics { null; };"
# EndGroup
#
- BeginGroupIfNoLineMatching '^include[[:blank:]]"/etc/local-COMMON/bind/named_$(fqhost).conf";.*'
+ BeginGroupIfFileExists "/etc/local-COMMON/bind/named_$(fqhost).conf"
+ BeginGroupIfNoLineMatching '^include[[:blank:]]"/etc/local-COMMON/bind/named_$(fqhost).conf";.*'
Append 'include "/etc/local-COMMON/bind/named_$(fqhost).conf";'
- Append '# EDITED BY CFENGINE $(date)'
+ Append '# EDITED BY CFENGINE $(date)'
+ EndGroup
+ DefineClasses "bind_reload"
EndGroup
- DefineClasses "bind_reload"
}
shellcommands: