Hello Team,
Require help in running a bash script on to a RHEL Server using Guest Script Manager Package.
Problem is that the package runs only the direct commands on the target RHEL Server and ignores any defined variable in the script.
Unable to use any variable defined in the script.
Example1
If we run the below via the Guest Script Manager Package. It does not return any output
Declared script as below and got blank result
Output1
While running the above script directly on a Linux Server gives the desired output.
Example2
Similarly if we remove the variable, and print it directly it works fine.
Output2
I actually ran into this same issue today. I was able to solve it by creating another resource element holding my actual script content and telling the script config to use that file via the "Copy a file in the guest" tickbox in the "Add script configuration vRO 8.x" or "Edit script configuration vRO 8.x" workflows.
Then in the script content for the script config, put something similar to the following...
chmod 0777 ./linuxBootstrap.sh
./linuxBootstrap.sh
Hopefully thats clear. Here are a couple screenshots:
Also, make sure you use LF and not CRLF in the bash script or you will get other errors.
Edit: Forgot to mention that by default your new script resource element should be at "Resources/COE/Guest resources". Not sure if that path is configurable or not.
As your post needs moving to the area for Aria Automation Orchestrator, I have reported it to the volunteer moderators.
I actually ran into this same issue today. I was able to solve it by creating another resource element holding my actual script content and telling the script config to use that file via the "Copy a file in the guest" tickbox in the "Add script configuration vRO 8.x" or "Edit script configuration vRO 8.x" workflows.
Then in the script content for the script config, put something similar to the following...
chmod 0777 ./linuxBootstrap.sh
./linuxBootstrap.sh
Hopefully thats clear. Here are a couple screenshots:
Also, make sure you use LF and not CRLF in the bash script or you will get other errors.
Edit: Forgot to mention that by default your new script resource element should be at "Resources/COE/Guest resources". Not sure if that path is configurable or not.
Thank You for the suggestion and the help.
It worked.