Hoping someone can help with some Solaris weirdness… I’m using prefetch to download a Korn shell script onto some Solaris test boxes and then execute the script like so:
wait /bin/sh -c "(cd __Download/ && chmod +x ctm918soinstall.ksh)"
wait /bin/sh -c “(cd __Download/ && ./ctm918soinstall.ksh)”
The script is written to hard-code any paths - to avoid issues with relative paths - and has also included several helpful exit codes. If the application (that the script pertains to) does not exist, it exits with exit code 124… And when I run this on my Solaris 10 & 11 test boxes, I see that exit code returned in the console.
However when I deploy it to the test boxes supplied by the business, I see exit code -110. (All lines of the task complete.) Yet when I check this locally with the server owner via ssh (as I don’t have access to these servers), these commands to chmod and then execute the script from the __Download folder execute no issue.
I’ve also tried wrapping it in an appendfile, but same issue:
delete __appendfile
delete {client folder of current site}/__Download/control-m.sh
appendfile #!/bin/sh
appendfile chmod +x {client folder of current site}/__Download/ctm918soinstall.ksh
appendfile /bin/ksh -c "cd {client folder of current site}/__Download/ && ./ctm918soinstall.ksh"
move __appendfile {client folder of current site}/__Download/control-m.sh
wait chmod 777 {client folder of current site}/__Download/control-m.sh
Any thoughts, or anything obvious I’m missing here?