summaryrefslogtreecommitdiff
path: root/cfengine/cf.services.dhcp
diff options
context:
space:
mode:
Diffstat (limited to 'cfengine/cf.services.dhcp')
-rw-r--r--cfengine/cf.services.dhcp21
1 files changed, 21 insertions, 0 deletions
diff --git a/cfengine/cf.services.dhcp b/cfengine/cf.services.dhcp
new file mode 100644
index 0000000..88a6f13
--- /dev/null
+++ b/cfengine/cf.services.dhcp
@@ -0,0 +1,21 @@
+control:
+ AddInstallable = ( dhcpd_reload )
+
+editfiles:
+ { /etc/dhcp.conf
+ #
+ # 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/dhcp.conf.$(site)"
+ Append "# Edited by cfengine $(date)"
+ EndGroup
+ DefineClasses "dhcpd_reload"
+ }
+
+shellcommands:
+ dhcpd_reload::
+ "/etc/init.d/dhcp force-reload"