iPXE discussion forum
fails to set variables - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: fails to set variables (/showthread.php?tid=10944)



fails to set variables - 123batman - 2018-02-20 01:21

Hello!
I am puzzled why this does not work (version 1.0.0+ (c9f6 as well as 546dd)):

#!ipxe
echo test
set vartest 200
echo $vartest
echo ${vartest}
sleep 5
exit

It displays
test


only. I was expecting to see
test
200
200

What am I doing wrong?

What I am really trying to do is set up a boot menu but with
choose --timeout 5000 --default ubuntu target
${target} is empty as well


RE: fails to set variables - NiKiZe - 2018-02-20 18:17

This works fine:
Code:
set vartest 2000
echo ${vartest}

Taken from http://ipxe.org/scripting and then modified

https://git.ipxe.org/ipxe.git/commitdiff/c9f6 is from June 2016 so old!
546dd is since Feb 3:rd and is almost the latest, works just fine.
But one question, do you have any local configuration changes? Could you try with a prebuilt binary from boot.ipxe.org?