16.6.2.12.22 End while
loop and shell exits
#!/usr/bin/ksh # # If srcmstr is running, ensure that it is active before issuing the # startsrc commands # if [ -n "$src_running"];then echo "Checking for srcmstr active...\c" i=10 # try ten times to contact it while [ $i != 10 ] ; do lssrc -s inetd >/dev/null 2>&1 && break # break out on success sleep 1 echo ".\c" i='expr $i -1' done if [ $i=0 ];then echo "\n\n ERROR:srcmstr is not accepting connections.\n" exit 1 fi echo "complete" else src_running="" fi
In the above section of code, what is the problem?