From 63c5c3ce2dafc097f7e6ec5157981eb5a656de15 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sat, 27 Jul 2019 10:04:24 +0200 Subject: backup: fail with 11 when not reachable by any ip version --- backup.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backup.in b/backup.in index 6e08d9e..cda64f8 100755 --- a/backup.in +++ b/backup.in @@ -136,6 +136,10 @@ elif [ "$#" -eq 4 ]; then | uniq -d \ | tail -n1 ) + if [ -z ${ipVer} ]; then + >&2 echo 'not reachable' + exit 11 + fi if [ ${ipVer} -eq 4 ]; then localAddress='127.0.0.1' elif [ ${ipVer} -eq 6 ]; then -- cgit v1.2.3