Error Code 1 Attempting To Run AIX script Through Big Fix Console

Attempting To Process a “sh” script through Big Fix Console.
Create Action as Follows:
wait rm -rf /tmp/bigfix_scripts
wait mkdir -p /tmp/bigfix_scripts/
move __Download/upgrade_7205sp2_v2.bff /tmp/bigfix_scripts/upgrade_7205sp2_v2.sh
continue if { exists file “/tmp/bigfix_scripts/upgrade_7205sp2_v2.sh” }
wait “/bin/sh” -c "chmod +x /tmp/bigfix_scripts/upgrade_7205sp2_v2.sh"
wait “/bin/sh” -c "/tmp/bigfix_scripts/upgrade_7205sp2_v2.sh"
parameter “Exitcode” = "{if exist exit code of action then exit code of action as string else “0”}"
if {parameter “Exitcode” != “0”}
exit 1
endif

Getting Results as Follows:

Command started - wait rm -rf /tmp/bigfix_scripts (action:9193)
Command succeeded (Exit Code=0) wait rm -rf /tmp/bigfix_scripts (action:9193)
Command started - wait mkdir -p /tmp/bigfix_scripts/ (action:9193)
Command succeeded (Exit Code=0) wait mkdir -p /tmp/bigfix_scripts/ (action:9193)
Command succeeded move __Download/upgrade_7205sp2_v2.bff /tmp/bigfix_scripts/upgrade_7205sp2_v2.sh (action:9193)
Command succeeded (evaluated true) continue if { exists file “/tmp/bigfix_scripts/upgrade_7205sp2_v2.sh” } (action:9193)
Command started - wait “/bin/sh” -c “chmod 755 /tmp/bigfix_scripts/upgrade_7205sp2_v2.sh” (action:9193)
Command succeeded (Exit Code=0) wait “/bin/sh” -c “chmod 755 /tmp/bigfix_scripts/upgrade_7205sp2_v2.sh” (action:9193)
Command started - wait “/bin/sh” -c “/tmp/bigfix_scripts/upgrade_7205sp2_v2.sh” (action:9193)
At 12:06:17 -0400 - actionsite (http://urmcbigfix.urmc-sh.rochester.edu:52311/cgi-bin/bfgather.exe/actionsite)
Command succeeded (Exit Code=1) wait “/bin/sh” -c “/tmp/bigfix_scripts/upgrade_7205sp2_v2.sh” (action:9193)
Command succeeded parameter “Exitcode” = “1” (action:9193)
Command succeeded (1) exit 1 (action:9193)

The BESClient does not run with the full environment of root on NIX endpoints. So if your script has any requirements on the full environment of root, you may wish to alter how the script is being executed as follows:

wait sudo su - root -c “/tmp/bigfix_scripts/upgrade_7205sp2_v2.sh”

You may wish to elaborate further by redirecting standard error and output to a file for additional logging. Hope this helps.

Thank You For YOur response!
Appreciate the input. Will attempt to make the necessary updates.