forked from saratov/diag-domain-client
Fix error handlers after output redesign
This commit is contained in:
parent
37794dc6f1
commit
dd4806cce2
6
ddiag.sh
6
ddiag.sh
@ -30,9 +30,11 @@ msg_done()
|
||||
|
||||
_command()
|
||||
{
|
||||
local retval=0
|
||||
color_message "\$ $*" bold
|
||||
$*
|
||||
$* || retval=$?
|
||||
echo
|
||||
return $retval
|
||||
}
|
||||
|
||||
run_by_root()
|
||||
@ -217,6 +219,8 @@ _check_nameserver()
|
||||
local ns="$1"
|
||||
if _command ping -c 2 -i2 "$ns"; then
|
||||
test -z "$DOMAIN_DOMAIN" || _command host "$DOMAIN_DOMAIN" "$ns"
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user