Ahhh, I see, I didn't realize that you were editing the dhcp.template
earlier, sorry for the confusion. Unfortunately it doesn't look like that
information is available in the $iface structure, so you'll have to have
the correct name servers defined in the subnet area.

Alternatively, you could modify site-packages/cobbler/modules/manage_isc.py
to do this yourself, by inserting this line:

diff --git a/cobbler/modules/manage_isc.py b/cobbler/modules/manage_isc.py
index e5253a0..a98831c 100644
--- a/cobbler/modules/manage_isc.py
+++ b/cobbler/modules/manage_isc.py
@@ -153,6 +153,7 @@ class IscManager:
                 interface["hostname"] = blended_system["hostname"]
                 interface["owner"] = blended_system["name"]
                 interface["enable_gpxe"] = blended_system["enable_gpxe"]
+                interface["name_servers"] = blended_system["name_servers"]

                 if not interface["netboot_enabled"] and
interface['static']:
                     continue



Then add this to the dhcp.template:

        #if $iface.name_servers
        #set $dns = ",".join($iface.name_servers)
        option domain-name-servers $dns;
        #end if

Feel free to open an issue for this on github and I'll get it added in
permanently.



On Tue, May 28, 2013 at 8:40 AM, Rainer Duffner <[email protected]>wrote:

> Am Tue, 28 May 2013 07:42:49 -0500
> schrieb James Cammarata <[email protected]>:
>
> > If the client detects that the address is already in use (e.g.,
> > through the use of ARP), the client MUST send a DHCPDECLINE message to
> > the server and restarts the configuration process.
>
>
> I figured it out.
> If (in the configuration-dialogue for a system) you enter a "Gateway" in
> "Networking (Global)" it is written to the dhcpd configuration file, as
> an option for that specific host (together with the subnet-mask, from
> the interface-specific, non-global "Networking" configuration.
> However, the nameservers you enter there and the search-path are not
> written into the dhcp configuration. This is actually opposite to what
> I want.
> Because, on the next reboot, the /etc/resolv.conf that is created by
> the postinstall cheetah-script is overwritten by the value of the
> "nameserver" line that I have to specify in the dhcp-template or else
> the installer would stop and ask for one....
>
> Is there some way to control what goes into the dhcp-configuration?
>
> # group for Cobbler DHCP tag: default
> group {
>     host generic1 {
>         hardware ethernet 00:0c:29:a1:f5:b6;
>         option host-name "ubuntu-test.espace.everyware.ch";
>         filename "/pxelinux.0";
>         next-server 10.38.111.19;
>     }
>     host generic2 {
>         hardware ethernet 00:0c:29:a1:f5:ac;
>         fixed-address 192.168.63.251;
>         option host-name "ubuntu-test.espace.everyware.ch";
>         option subnet-mask 255.255.255.128;
>         filename "/pxelinux.0";
>         next-server 10.38.111.19;
>     }
> }
>
>
> generic1 is actually eth1 and generic2 is eth0.
> The first host is generated from data from the "Network (Global)" tab,
> the  second host ist generated from the interface-specific data from
> the "Networking" tab.
>
> I entered a MAC address for generic2 because the late_preseed script
> insisted on the existance of a MAC-address (it would write an empty
> hw-address line in the /etc/network/interfaces file otherwise).
> I wouldn't need generic2 to even show-up in the dhcp-configuration, but
> I can live with that at the moment.
>
>
> Lastly, it seems static routes are not transferred.
>
> I've entered a static loop in the form
>
>
> net.work.ip.addr/subnet:gateway
>
> But it did not show up.
>
>
> Sorry for the long mail.
>
>
>
> Regards,
> Rainer
> _______________________________________________
> cobbler mailing list
> [email protected]
> https://lists.fedorahosted.org/mailman/listinfo/cobbler
>
_______________________________________________
cobbler mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/cobbler

Reply via email to