Re: dhcp.template and multiple subnets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael DeHaan wrote:
Peter Wright wrote:
hi,
just noticed an issue when you define multiple subnets in dhcp.template. it seems that if you have setup your template file to use mutiple subnets dhpcd will fail to start unless you have tagged a system to live on one of the secondary subnets. for example take this dhcp.template:

subnet 172.30.214.0 netmask 255.255.255.0 {
...
}

$insert_cobbler_system_definitions

subnet 172.30.206.0 netmask 255.255.255.0 {
...
}

$insert_cobbler_system_definitions_abq



restarting dhcpd (or running cobbler sync) will fail due to the fact that "$insert_cobbler_system_definitions_abq" will litterally end up in /etc/dhpcd.conf. once you tag a system to use the secondary subnet (in this case --dhcp-tag=abq) the $insert_cobbler... variable is expanded correctly and dhcp restarts as expected.

i am not sure if anyone else has run into this, or if this issue can we worked around (i am not too familiar with how template's).

-pete



This would work... I'll add it to the Wiki.

#if $getVar("insert_cobbler_system_definitions_abq","none") != "none"
subnet 172.30.206.0 netmask 255.255.255.0 {
...
}
$insert_cobbler_system_definitions_abq
#end if






Small tweak:

#if $getVar("insert_cobbler_system_definitions_abq","") != ""
subnet 172.30.206.0 netmask 255.255.255.0 {
...
}
$insert_cobbler_system_definitions_abq
#end if




_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux