This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Re: how to use Installanywhere variable in Exceute shell script action
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 05, 2008
07:44 PM
how to use Installanywhere variable in Exceute shell script action
I use Execute script/Batch action under install tab
I provide the script but my script is not able to resolve the installanwyhere variable $USER_ISNATLL_DIR$.How to use it.
Below is my script
#!/usr/bin/bash
x='isainfo -kv'
if [ "$x"="64-bit amd64 kernel modules" ];then
pkgadd -n -a $USER_INSTALL_DIR$$\$admin.txt -d $USER_INSTALL_DIR$$\$solaris$\$i386$\$64bit$\$bfa_pkg all
#pkgadd -n -a /opt/brocade/hcm/admin.txt -d /opt/brocade/hcm/solaris/i386/64bit/bfa_pkg all
else
if [ "$x"="32-bit i386 kernel modules" ];then
pkgadd -n -a $USER_INSTALL_DIR$$\$admin.txt -d $USER_INSTALL_DIR$$\$solaris$\$i386$\$32bit$\$bfa_pkg all
fi
fi
however if i use absolute path like
pkgadd -n -a /opt/brocade/hcm/admin.txt -d /opt/brocade/hcm/solaris/i386/64bit/bfa_pkg all
it works fine.
I am runnnning on solaris x86 32 bit and 64 bit platforms.
How does script resolve installanwyhere variable
I use show message dialog to display if above files are found and i get teh appropriate out put that both files are found.
Only in shell script there seems to be problem .
Any help is greatly appreciated
Thanks
Shradha
I provide the script but my script is not able to resolve the installanwyhere variable $USER_ISNATLL_DIR$.How to use it.
Below is my script
#!/usr/bin/bash
x='isainfo -kv'
if [ "$x"="64-bit amd64 kernel modules" ];then
pkgadd -n -a $USER_INSTALL_DIR$$\$admin.txt -d $USER_INSTALL_DIR$$\$solaris$\$i386$\$64bit$\$bfa_pkg all
#pkgadd -n -a /opt/brocade/hcm/admin.txt -d /opt/brocade/hcm/solaris/i386/64bit/bfa_pkg all
else
if [ "$x"="32-bit i386 kernel modules" ];then
pkgadd -n -a $USER_INSTALL_DIR$$\$admin.txt -d $USER_INSTALL_DIR$$\$solaris$\$i386$\$32bit$\$bfa_pkg all
fi
fi
however if i use absolute path like
pkgadd -n -a /opt/brocade/hcm/admin.txt -d /opt/brocade/hcm/solaris/i386/64bit/bfa_pkg all
it works fine.
I am runnnning on solaris x86 32 bit and 64 bit platforms.
How does script resolve installanwyhere variable
I use show message dialog to display if above files are found and i get teh appropriate out put that both files are found.
Only in shell script there seems to be problem .
Any help is greatly appreciated
Thanks
Shradha
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 05, 2008
09:12 PM
I kind of figured ou the problem.
SO script would not be able to resolve $USER_INSTALL_DIR$ variable
So I use action
set System environment variable
before my execute script action
and i do
Variable Name INSTALL_AT
Set value To $USER_INSTALL_DIR$
Script goes as follows
#!/usr/bin/bash
x='isainfo -kv'
if [ "$x"="64-bit amd64 kernel modules" ];then
pkgadd -n -a $INSTALL_AT/admin.txt -d $INSTALL_AT/bfa_pkg all
#pkgadd -n -a /opt/brocade/hcm/admin.txt -d /opt/brocade/hcm/solaris/i#386/64bit/bfa_pkg all
else
if [ "$x"="32-bit i386 kernel modules" ];then
pkgadd -n -a $INSTALL_AT/admin.txt -d $INSTALL_AT/solaris/i386/32bit/bfa_pkg all
fi
fi
I run the installer but no environment variable is set
since my system is amd 64 i expect first if to execute
after the installation i check
echo $INSTALL_AT
but get nothing
so Install anywher is not able to set environment variable
Why is the set system environment variable not working
Any help is greatly appreciated
SO script would not be able to resolve $USER_INSTALL_DIR$ variable
So I use action
set System environment variable
before my execute script action
and i do
Variable Name INSTALL_AT
Set value To $USER_INSTALL_DIR$
Script goes as follows
#!/usr/bin/bash
x='isainfo -kv'
if [ "$x"="64-bit amd64 kernel modules" ];then
pkgadd -n -a $INSTALL_AT/admin.txt -d $INSTALL_AT/bfa_pkg all
#pkgadd -n -a /opt/brocade/hcm/admin.txt -d /opt/brocade/hcm/solaris/i#386/64bit/bfa_pkg all
else
if [ "$x"="32-bit i386 kernel modules" ];then
pkgadd -n -a $INSTALL_AT/admin.txt -d $INSTALL_AT/solaris/i386/32bit/bfa_pkg all
fi
fi
I run the installer but no environment variable is set
since my system is amd 64 i expect first if to execute
after the installation i check
echo $INSTALL_AT
but get nothing
so Install anywher is not able to set environment variable
Why is the set system environment variable not working
Any help is greatly appreciated
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 08, 2008
01:55 AM
While looking at your script in the first post, I noticed the variable "x" is not set like it should.
If you want to have "$x" written in your script, you need to define it as "$DOLLAR$x"
if [ "$DOLLAR$x"="64-bit ...etc...
In IA, variable DOLLAR is resolved as $.
BR
If you want to have "$x" written in your script, you need to define it as "$DOLLAR$x"
if [ "$DOLLAR$x"="64-bit ...etc...
In IA, variable DOLLAR is resolved as $.
BR
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 08, 2008
06:18 PM
Hi Jerome_IA
Thanks for your response and pointing out teh orrection ins cript.. I will amke this cahnge of using $DOLLAR$.
I found the soultion to my problem in following way
1.use Installanwyeher variable in script say $USER_INSTALL_DIR$
2.use action modify text file
procide your script file and choose option "subsitute vale for installnwyehe variable"
3. use execute command action
sh script1.sh
this will atke care of the problem.No "set system environment variable" action is needed
Thanks for your response and pointing out teh orrection ins cript.. I will amke this cahnge of using $DOLLAR$.
I found the soultion to my problem in following way
1.use Installanwyeher variable in script say $USER_INSTALL_DIR$
2.use action modify text file
procide your script file and choose option "subsitute vale for installnwyehe variable"
3. use execute command action
sh script1.sh
this will atke care of the problem.No "set system environment variable" action is needed
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 15, 2008
11:12 PM
hi shradha,
the modify text file action in the script is a kind of workaround which even i do use in my scripts but i wish the refresh environment action to take place and for this the refresh.dll should work efficiently.
I am trying to achieve this and once i am done shall contribute to accresso installanywhere 9.0 or so.
Even any other member of this group can mail me and help me out in implementing this feature.
Best Regards,
James
the modify text file action in the script is a kind of workaround which even i do use in my scripts but i wish the refresh environment action to take place and for this the refresh.dll should work efficiently.
I am trying to achieve this and once i am done shall contribute to accresso installanywhere 9.0 or so.
Even any other member of this group can mail me and help me out in implementing this feature.
Best Regards,
James
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)