summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-07-27 10:04:24 +0200
committerErich Eckner <git@eckner.net>2019-07-27 10:04:24 +0200
commit63c5c3ce2dafc097f7e6ec5157981eb5a656de15 (patch)
tree1f7129f474f3109a717f7e431cf611d9162cbbc2
parent70599b10c5863210b9017abed94fc7fc8ece1270 (diff)
downloadhardlinkedBackups-63c5c3ce2dafc097f7e6ec5157981eb5a656de15.tar.xz
backup: fail with 11 when not reachable by any ip version
-rwxr-xr-xbackup.in4
1 files changed, 4 insertions, 0 deletions
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