Greg
Updated the kickstart, same error
accepteula install --firstdisk --overwritevmfs
# RootPassword is taken from the default setting of cobbler rootpw --iscrypted $$default_password_crypted
reboot %include /tmp/networkconfig %pre --interpreter=busybox
# extract network info from bootup VMK_INT="vmk0" VMK_LINE=$$(localcli network ip interface ipv4 get | grep "$${VMK_INT}") IPADDR=$$(echo "$${VMK_LINE}" | awk '{print $$2}') NETMASK=$$(echo "$${VMK_LINE}" | awk '{print $$3}') GATEWAY=$$(esxcfg-route | awk '{print $$5}')
Error in the Python code which Cheetah generated for this template: ================================================================================
EOL while scanning string literal (cheetah_DynamicallyCompiledCheetahTemplate_1336515429_59_40496.py, line 81)
Line|Python Code ----|------------------------------------------------------------- 79 | 80 | try: 81 | return eval('''VFFSL(SL,"echo",True) "$${VMK_LINE}" | awk '{print $$2}'''', globals(), localsDict) ^ 82 | return self._CHEETAH__errorCatcher.warn(exc_val=e, code= u'VFFSL(SL,"echo",True) "$${VMK_LINE}" | awk '{print $$2}'' , rawCode= u'$(echo "$${VMK_LINE}" | awk '{print $$2}')' , lineCol=(22, 9)) 83 | 84 | def __errorCatcher4(self, localsDict={}):
================================================================================
Here is the corresponding Cheetah code. ** I had to guess the line & column numbers, so they are probably incorrect:
Line 11, column 21
Line|Cheetah Code ----|------------------------------------------------------------- 8 |install --firstdisk --overwritevmfs 9 | 10 |# RootPassword is taken from the default setting of cobbler 11 |rootpw --iscrypted $$default_password_crypted ^ 12 | 13 |reboot 14 |
Thanks
John
-----Original Message----- From: cobbler-bounces@lists.fedorahosted.org [mailto:cobbler-bounces@lists.fedorahosted.org] On Behalf Of Greg Swift Sent: 08 May 2012 22:36 To: cobbler mailing list Subject: Re: [cobbler] KS generation error
On Tue, May 8, 2012 at 3:51 PM, John Paget Bourke john.bourke@mobileinternet.com wrote:
Greg & List,
Thanks for the reply. I have finally got back to it. Not sure the error is reporting the right location in the script.
I am back to square one with this. When I have 1 $ I get an error and when I have 2 $ I get an error. Raw data and error below.
Here is the raw kickstart file
# Sample kickstart for ESXi 5.0
# William Lam
# www.virtuallyghetto.com
#########################################
accepteula
install --firstdisk --overwritevmfs
# RootPassword is taken from the default setting of cobbler
rootpw --iscrypted $default_password_crypted
reboot
%include /tmp/networkconfig
%pre --interpreter=busybox
# extract network info from bootup
VMK_INT="vmk0"
VMK_LINE=$$(localcli network ip interface ipv4 get | grep "$${VMK_INT}")
IPADDR=$$(echo "$${VMK_LINE}" | awk '{print $$2}')
NETMASK=$$(echo "$${VMK_LINE}" | awk '{print $$3}')
GATEWAY=$$(esxcfg-route | awk '{print $$5}')
try that?
I'd assume that the templating engine is going after all the $'s not just the first one in the line. So thus you error cause it doesn't know what $VMK_INT, $VMK_LINE, $2, $3, and $5 are.
-greg _______________________________________________ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler