Jasper Capel wrote:
> Hey,
>
> I added a pre_install_network_config snippet, which is a bit similar to 
> the disk-configuration-management:
> The pre-install code gets the information from cobbler, and it writes 
> some bash code to match the right IP to the right network interface as 
> seen by anaconda. This bash code writes the "network" statements, which 
> are included in the normal installation section of the kickstart.
> This only makes sense if MAC-addresses are recorded in Cobbler for all 
> physical network interfaces. If this is not the case, the network_config 
> snippet (which I slightly modified, again) falls back to the old behaviour.
> This should fix any NIC enumeration problems  discussed before, and make 
> sure the arbitrary interface names code works like it should (i.e. not 
> mix up your interfaces).
>
> git://bender.newnewyork.nl/cobbler (branch: networking)
> http://bender.newnewyork.nl/git/gitweb.cgi?p=cobbler/.git;a=commit;h=1ccfec4d777924da463f7373193953b5d17f9983
>
> In this branch, I also added this code to sample.ks.
>
> # Start pre_install_network_config generated code
>
> An example of the bash code generated:
> # Start of code to match cobbler system interfaces to physical 
> interfaces by their mac addresses
> #  Start blub.11
> #  Skipping (not a physical interface)...
> #  Start eth0.10
> #  Skipping (not a physical interface)...
> #  Start blub
> #  Skipping (no configuration)...
> #  Start eth0
> # Configuring eth0 (00:0C:29:99:81:BD)
> if ifconfig | grep -i 00:0C:29:99:81:BD
> then
>    IFNAME=$(ifconfig | grep -i '00:0C:29:99:81:BD' | cut -d " " -f 1)
>    echo "network --device=$IFNAME --bootproto=static --ip=10.0.8.250 
> --netmask=255.255.255.0 --gateway=10.0.8.254" >> 
> /tmp/pre_install_network_config
> fi
>
> Which is included in the normal section of the kickstart:
> # Network information
> # Using "new" style networking config, by matching networking 
> information to the physical interface's
> # MAC-address
> %include /tmp/pre_install_network_config
>
>
> --Jasper
> _______________________________________________
> cobbler mailing list
> [email protected]
> https://fedorahosted.org/mailman/listinfo/cobbler
>   

As the existing /var/lib/cobbler/snippets/network_config already adds 
"network --blah..." lines to the kickstart file, won't including them 
again from the %include cause problems? It would seem one snippet needs 
to know about other, or does the second network_config snippet (for the 
main body of the kickstart) get replaced by the include?

--Michael

_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to