Check whether netcheck exists before relying on it

This commit is contained in:
Bryan Boreham committed 2015-06-11 17:55:27 +01:00
1 parent 465b16e668
commit 328e63828e
1 file changed
+1 -1
+1 -1
View File
@@ -986,7 +986,7 @@ case "$COMMAND" in
eval "set -- $ARGS"
if [ -z "$IPRANGE" ] ; then
IPRANGE="-iprange 10.128.0.0/9"
if ! netcheck ${IPRANGE#* } ; then
if command_exists netcheck && ! netcheck ${IPRANGE#* } ; then
echo "Default" $IPRANGE "overlaps with existing route." >&2
echo "Please pick another range and set it on all hosts." >&2
exit 1