Am Mon, 27 May 2013 06:27:28 -0500 schrieb James Cammarata <[email protected]>:
> 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 OK, so I have: [root@cobbler ~]# tail -n 5 \ /var/lib/cobbler/kickstarts/u12-noncore2.seed # packages and run commands in the target system. # d-i preseed/late_command string [command] d-i preseed/late_command string wget -O- \ http://$http_server/cblr/svc/op/script/$what/$name/?script=preseed_late_default2 | \ chroot /target /bin/sh -s When I run that line on the shell, I get: # Start preseed_late_default # This script runs in the chroot /target by default $SNIPPET('post_install_network_config2_deb') # start late_apt_repo_config cat<<EOF>/etc/apt/sources.list deb http://cobbler-server-ip/cblr/links/Ubuntu12-x86_64 precise main EOF # end late_apt_repo_config # A general purpose snippet to add late-command actions for preseeds # Start download cobbler managed config files (if applicable) # End download cobbler managed config files (if applicable) wget "http://cobbler-server-ip/cblr/svc/op/ks/system/test-ubuntu" \ -O /var/log/cobbler.seed wget \ "http://cobbler-server-ip/cblr/svc/op/trig/mode/post/system/test-ubuntu" -O /dev/null # End preseed_late_default When I run that, I get the 4-byte file with "True" in it. No error-message in /var/log/cobbler/cobbler.log > 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","") Thanks, I was looking for something like this. Unfortunately, it did not help. How can I debug this? _______________________________________________ cobbler mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/cobbler
