summaryrefslogtreecommitdiff
path: root/cfengine
diff options
context:
space:
mode:
authorJuri Jensen <juri@xenux.dk>2002-11-28 12:02:21 +0000
committerJuri Jensen <juri@xenux.dk>2002-11-28 12:02:21 +0000
commitb70e92fcad0462324286e63c05fa826217034041 (patch)
tree644ea5b3a879c50d56b2ae68963f4e950f29a9fe /cfengine
parentfbf09af9c5a0c1c443ac95d759a5b10a7abc5e5e (diff)
cfengine: Added support for of DHCP version 3.
dhcp: Added config file for both primary and secondary DHCP server for xenux.local. Removed the old dhcpd.conf for xenux.local - we're now using the new version 3 server.
Diffstat (limited to 'cfengine')
-rw-r--r--cfengine/cf.groups.xenux17
-rw-r--r--cfengine/cf.services.dhcp30
2 files changed, 36 insertions, 11 deletions
diff --git a/cfengine/cf.groups.xenux b/cfengine/cf.groups.xenux
index 950aece..bfda658 100644
--- a/cfengine/cf.groups.xenux
+++ b/cfengine/cf.groups.xenux
@@ -4,23 +4,20 @@
groups:
xenux = ( elrond oin smaug bilbo orcrist beorn bill thorin pippin glamdring )
xenuxlocal = ( gandalf thorin legolas pc60 pc61 pc62 pc63 pc64 pc65 pc66 pc67 pc68 pc69 pc70 pc71 pc72 pc73 pc74 pc75 pc76 pc77 pc78 pc79 pc80 )
- raps = ( aries )
sagahus = ( saga )
- venture = ( mimer heimdal thor )
- ntiexpo = ( balrog )
louiz = ( saks lineal )
Standalone_xenux = ( pc60 pc61 pc62 pc63 pc64 pc65 pc66 pc67 pc68 pc69 pc70 pc71 pc72 pc73 pc74 pc75 pc76 pc77 pc78 pc79 pc80 )
WWWServer_xenux = ( beorn smaug saga )
- FTPServer_xenux = ( beorn smaug mimer )
- NameServer_xenux = ( elrond gandalf saga heimdal balrog pippin )
- FileServer_xenux = ( orcrist gandalf aries saga thor balrog )
- VPNServer_xenux = ( orcrist aries heimdal )
- Firewall_xenux = ( orcrist aries saga heimdal glamdring )
+ FTPServer_xenux = ( beorn smaug )
+ NameServer_xenux = ( elrond gandalf saga pippin thorin )
+ FileServer_xenux = ( orcrist gandalf aries saga )
+ VPNServer_xenux = ( orcrist aries )
+ Firewall_xenux = ( orcrist aries saga glamdring )
CVSServer_xenux = ( bilbo bill )
GMServer_xenux = ( bilbo )
SpamAssServer_xenux = ( oin )
- DHCPServer_xenux = ( orcrist saga thorin heimdal balrog thorin )
+ DHCPServer_xenux = ( saga thorin legolas gandalf )
FAIServer_xenux = ( thorin )
CDWriter_xenux = ( gandalf )
IMAPServer_xenux = ( oin )
@@ -33,6 +30,6 @@ groups:
wol_xenux = ( aries )
cc_xenux = ( saga )
# tdk_xenux = ( )
- wp_xenux = ( oin www bilbo orcrist smaug beorn heimdal mimer )
+ wp_xenux = ( oin www bilbo orcrist smaug beorn )
# dnai_xenux = ( )
# sunrise_xenux = ( )
diff --git a/cfengine/cf.services.dhcp b/cfengine/cf.services.dhcp
index 695ebf0..81b7f4d 100644
--- a/cfengine/cf.services.dhcp
+++ b/cfengine/cf.services.dhcp
@@ -1,7 +1,14 @@
control:
- AddInstallable = ( dhcpd_reload )
+ AddInstallable = ( dhcpd_reload dhcpd3 dhcpd3_reload )
+
+classes:
+ #
+ # Determine if this is a version 3 DHCP server
+ #
+ dhcpd3 = ( `/usr/bin/test -x /usr/sbin/dhcpd3` )
editfiles:
+ !dhcpd3::
{ /etc/init.d/dhcp
#
# First of all, this is a DHCP server so let's make it possible
@@ -28,10 +35,31 @@ editfiles:
DefineClasses "dhcpd_reload"
EndGroup
}
+ dhcpd3::
+ { /etc/dhcp3/dhcpd.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.
+ #
+ BeginGroupIfFileExists "/etc/local-COMMON/dhcpd_$(fqdn).conf"
+ BeginGroupIfFileIsNewer "/etc/local-COMMON/dhcpd_$(fqdn).conf"
+ AutoCreate
+ EmptyEntireFilePlease
+ InsertFile "/etc/local-COMMON/dhcpd_$(fqdn).conf"
+ Append "# Edited by cfengine $(date)"
+ EndGroup
+ DefineClasses "dhcpd3_reload"
+ EndGroup
+ }
processes:
+ !dhcpd3::
"dhcpd-2.2.x" restart "/etc/init.d/dhcp restart"
+ dhcpd3::
+ "" restart /etc/init.d/dhcp3-server restart"
shellcommands:
dhcpd_reload::
"/etc/init.d/dhcp force-reload"
+ dhcpd3_reload::
+ "/etc/init.d/dhcp3-server force-reload"