Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
fails to set variables
2018-02-20, 01:21
Post: #1
fails to set variables
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
Find all posts by this user
Quote this message in a reply
2018-02-20, 18:17
Post: #2
RE: fails to set variables
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?

Use GitHub Discussions
VRAM bin
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)