Not able to install a software using bash scripts

I’m having issues installing new software on Redhat 8 and 7 machines using bash script, the same command works perfectly from the command line as root but will not work from the fixlet even though it exits with 0 exit code.

Command succeeded (Exit Code=0) wait bash -c “(cd ‘/var/opt/BESClient/__BESData/CustomSite_TEST/__Download/SOMESOFTWARE_FOR_REDHAT/’ && ./setup -i /opt -D ‘myhost.name’ -P 8080)”

From my observation, root user and BESClinet behaviors is not the same.

I did review other post and tried different command but no luck so far:

Any suggestions would be appreciated.

Thanks.

It can vary -a lot- based on whatever the installer shell script is trying to do.

In particular the shell launched by BigFix is a non-login shell - so it doesn’t source .profile or .login or .bashrc or whatever the shell init files are that usually supply you with environment variables. So if the bash script depends on something in the environment, it may not be there.

You could try the /bin/bash --login -c parameter and see whether that helps.

It might also be useful to redirect the output and stderr to a file to read whether there are any errors messages
.

1 Like

That worked!, Thanks for your support Jason.

2 Likes