Make $? compatible with set -e in system tests
Ensure handling of return code from previous command doesn't cause the script to halt if that code is non-zero when running with `set -e`.
This commit is contained in:
@@ -765,13 +765,13 @@ echo_i "check command list ($n)"
|
||||
(
|
||||
while read cmd
|
||||
do
|
||||
echo "$cmd" | $NSUPDATE > /dev/null 2>&1
|
||||
if test $? -gt 1 ; then
|
||||
{ echo "$cmd" | $NSUPDATE > /dev/null 2>&1; rc=$?; } || true
|
||||
if test $rc -gt 1 ; then
|
||||
echo_i "failed ($cmd)"
|
||||
ret=1
|
||||
fi
|
||||
echo "$cmd " | $NSUPDATE > /dev/null 2>&1
|
||||
if test $? -gt 1 ; then
|
||||
{ echo "$cmd " | $NSUPDATE > /dev/null 2>&1; rc=$?; } || true
|
||||
if test $rc -gt 1 ; then
|
||||
echo_i "failed ($cmd)"
|
||||
ret=1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user