All snippets are python-cheetah templates, so what appears to be commented-out python is actually the cheetah templating language.
The post_install_network_config_deb script is used inside the /var/lib/cobbler/scripts/preseed_late_default script, which is called as the late_command in the sample.seed: d-i preseed/late_command string wget -O- \ http://$http_server/cblr/svc/op/script/$what/$name/?script=preseed_late_default | \ chroot /target /bin/sh -s Where $what is either "system" or "profile". To set the gateway in ubuntu, use: $ cobbler system edit --name=foo --interface=ethX --if-gateway=1.2.3.4 Note from above, your variable $ksgw would not be stored in $idata (which is the interface data for the system), rather you would put it in --ksmeta and then get the variable with just: #set $ksgw = $getVar("ksgw","") On Mon, May 27, 2013 at 4:05 AM, Rainer Duffner <[email protected]>wrote: > Am Fri, 24 May 2013 20:15:54 -0500 > schrieb James Cammarata <[email protected]>: > > > I just packaged 2.4.0 beta6 up, which includes everything I mentioned > > earlier. I have been testing it quite a bit and it seems pretty solid > > as far as Ubuntu/ESXi support goes. > > > > The above is part of the reason I keep delaying the release - I'm > > really trying to make this a solid release with as few new problems > > as possible while fixing a lot of the glaring issues that have > > existed for a while (sub-par ubuntu support was at the top of that > > list). There is one final bug that I think is a blocker for an > > official release ( https://github.com/cobbler/cobbler/issues/462) > > which is related to the new distro signatures support. Once I have > > that fixed, I will not do a beta 7 and will release 2.4.0 officially. > > > > So go test beta6 for now, and let me know if you find any problems - > > specifically with Ubuntu or ESXi 5+ builds. > > > > > Hi, > > this is probably more a failure to understand on my side - how is the > post_install_network_config_deb script supposed to work? > > It looks like a mix of shell and python to me, with the python > commented out. > > As you might remember, I can't set the gateway in cobbler, or DHCP does > not assign an IP. > I try to assign it in kickstart metadata ($ksgw) and modified the above > script like this: > > [root@cobbler ~]# > diff /var/lib/cobbler/snippets/post_install_network_config2_deb > /var/lib/cobbler/snippets/post_install_network_config_deb > 66d65 < #set $ksgw = $idata.get("ksgw", "") > 171,172c170,171 > < #if $ksgw != "" > < echo " gateway $ksgw" >> /etc/network/interfaces > --- > > #if $if_gateway != "" > > echo " gateway $if_gateway" >> /etc/network/interfaces > > > > which results in the output of the single word "True". > > > [root@cobbler ~]# cobbler system dumpvars --name=test-ubuntu |grep ksgw= > ks_meta : ksgw=192.168.63.161 > tree=http://@@http_server@@/cblr/links/Ubuntu12-x86_64 > > > Can anyone shed a bit of light onto this? > > > Best 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
