I have a long bash script doing a number of things that reaches this point...
(at the end of a case statement)...
{
/usr/bin/expect << EOF
set timeout 120
spawn ssh -o StrictHostKeyChecking=no root@$AMHOST1$DOMAIN "/opt/cert_hell.sh"\
expect assword:
send "$PASSWD\r"
expect #
EOF
}
;;
esac
case $ADMCFG in
($AMHOST2)
echo "############ Now we move on with our installation... ##############"
echo ""
# installation
mkdir -p /path/to/install/directory
cd /path/to/install/directory
unzip /path/to/software/source.zip`
at this point it simply dies with no output to stdout. I ran with an strace -f and here are the relevant results:
[pid 3770] +++ exited with 0 +++
<... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 3770
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7f4a5d957d40}, {0x4438a0, [], SA_RESTORER, 0x7f4a5d957d40}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=3770, si_status=0, si_utime=6, si_stime=8} ---
wait4(-1, 0x7fff3323ddd8, WNOHANG, NULL) = -1 ECHILD (No child processes)
rt_sigreturn() = 0
read(255, "exit 0\n\n# Here we begin configur"..., 4316) = 374
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
exit_group(0) = ?
+++ exited with 0 +++
I'm not certain if this string 'read(255, "exit 0...' is the culprit nor can I ascertain why it is exiting suddenly. It does move on and briefly attempts to perform the unzip operation before it dies. If anyone has any ideas they would be greatly appreciated.