Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

System / Jumpstart Variables in Bourne Problem

Status
Not open for further replies.

AnotherAlan

Technical User
Feb 10, 2006
362
GB
Hi all,

I am attempting to build a custom jumpstart begin script that builds the profile on the fly.
I am experiencing an error on the following test argument;

if [ ${SI_ROOTDISKSIZE} -lt 36864 ]
then
ROOT_SIZE=10240
else
ROOT_SIZE=15360
fi

the error being;

/tmp/install_config/Begin/etc.be: test: argument expected
Begin script Begin/etc.be failed with return value "1".

I have succesfully used SI_ROOTDISKSIZE in previous scripts.
Can anyone see an obvious error here? It all looks fine to me but Solaris doesn't like it.

As always, all help much appreciated.
Alan
 
It does appear that SI_ROOTDISKSIZE is undefined. It is safer to quote variables like this when it's possible that they will be undefined:

[tt]if [ "${SI_ROOTDISKSIZE}" -lt 36864 ][/tt]

I'm not sure why it's not defined though...

Annihilannic.
 
Thanks Anni,

I'll give it a go with the quotes.

Much appreciated.
Alan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top