diff options
author | makefu <github@syntax-fehler.de> | 2011-09-12 14:32:18 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2011-09-12 14:32:18 +0200 |
commit | 9f70f9b5b462aa3e150b9708f695edfaf716edd4 (patch) | |
tree | 5cbebe6cbc0ada2c988d7f14d0bbbc52a68b37c1 /retiolum/bin/check-free-retiolum-v4 | |
parent | 568fbd7fa5541182bbbc33560863ec9c3ff01d48 (diff) | |
parent | a07326f6c57a7e8f49b9bef96ded427275a16e2e (diff) |
Merge branch 'master' into punani_files
Diffstat (limited to 'retiolum/bin/check-free-retiolum-v4')
-rwxr-xr-x | retiolum/bin/check-free-retiolum-v4 | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/retiolum/bin/check-free-retiolum-v4 b/retiolum/bin/check-free-retiolum-v4 index e9c6b3ce..3f0dbdf8 100755 --- a/retiolum/bin/check-free-retiolum-v4 +++ b/retiolum/bin/check-free-retiolum-v4 @@ -1,5 +1,4 @@ #! /bin/sh -set -x netname=retiolum myipv4=${1-10.7.7.-1} v4num=${myipv4##*.} @@ -10,12 +9,12 @@ then cd /etc/tinc/$netname/hosts printf "Check if ip is still free: " for i in `ls -1`; do - if grep $myipv4 $i &>/dev/null ;then + if grep -q -e $myipv4\$ $i ;then echo "Host IP already taken by $i! " exit 1 fi done - printf "Passed" + printf "Passed\n" else printf "you are made of stupid. bailing out\n" exit 1 |