From b70e92fcad0462324286e63c05fa826217034041 Mon Sep 17 00:00:00 2001 From: Juri Jensen Date: Thu, 28 Nov 2002 12:02:21 +0000 Subject: 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. --- cfengine/cf.groups.xenux | 17 +++++++---------- cfengine/cf.services.dhcp | 30 +++++++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 11 deletions(-) (limited to 'cfengine') 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" -- cgit v1.2.3