Hi all -

I am using STAF inside BASH scripts with RHEL5 to control the the automated 
installation of software I need to regression test nightly.

On the target test system, the STAF is running.

>From my staf-mgmt system, I need to execute a command on the remote client 
>system that contains a reference to an environment variable on the remote 
>system that is NOT set on the mgmt client.

As an example, here is the bash script code that I need to run on the remote 
server to stop some applications.  Notice the global env var $GLASSFISH_HOME in 
the asadmin command inside the PROCESS command stack.  This does not get 
de-referenced on the remote system as the var $GLASSFISH_HOME is not set on my 
staf mgmt system.

#--> staf cmd
su - root -c "/usr/local/staf/bin/STAF $SUT_PRI PROCESS START SHELL COMMAND \"
   # service maf-tds stop
   su - mafadmin
   asadmin stop-cluster --user admin --passwordfile 
$GLASSFISH_HOME/passwords.txt cluster1
   # asadmin stop-domain domain1
   # asadmin stop-node-agent agent_PRIM0
\" WAIT STDERRTOSTDOUT STDOUT /tmp/stop_primary_server_activity.log" 2>&1 > 
/dev/null
#--> end staf cmd

I have tried escaping it as follows:

#--> staf cmd
su - root -c "/usr/local/staf/bin/STAF $SUT_PRI PROCESS START SHELL COMMAND \"
   # service maf-tds stop
   su - mafadmin
   asadmin stop-cluster --user admin --passwordfile 
\$GLASSFISH_HOME/passwords.txt cluster1
   # asadmin stop-domain domain1
   # asadmin stop-node-agent agent_PRIM0
\" WAIT STDERRTOSTDOUT STDOUT /tmp/stop_primary_server_activity.log" 2>&1 > 
/dev/null
#--> end staf cmd

but that doesn't seem to work either.  What am I missing?

Thanks for any help

Mike


This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to