iPXE discussion forum

Full Version: fails to set variables
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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?
Reference URL's