summaryrefslogtreecommitdiffstats
path: root/netset
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2018-03-31 14:36:22 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2018-03-31 14:36:22 +0200
commit5a619f8aa141485edeac706564568cf67057224a (patch)
tree2910b0e8fbcfff1e86891e862285df520f387346 /netset
parentf1a012e8033de4cc49117488a147bd5461e8efa7 (diff)
downloadbin-5a619f8aa141485edeac706564568cf67057224a.zip
bin-5a619f8aa141485edeac706564568cf67057224a.tar.gz
netset : reject ipv6 for now
Diffstat (limited to 'netset')
-rwxr-xr-xnetset5
1 files changed, 3 insertions, 2 deletions
diff --git a/netset b/netset
index f6742d9..2ab1d90 100755
--- a/netset
+++ b/netset
@@ -21,12 +21,13 @@ do
done
N=0
dev=$(cat /etc/netctl/$profile | sed -n 's/Interface\=\(.*\)/\1/p')
-ADDR=$(ip -c addr show dev $dev | grep inet)
+ADDR=""
while [ -z "$ADDR" ]
do
N=$((N + 1))
[ $N -eq 10 ] && echo " failure" && exit 1
echo -n "." && sleep 1
- ADDR=$(ip -c addr show dev $dev | grep inet)
+ ADDR=$(ip -c addr show dev $dev | sed -n '/inet /p')
done
+echo
echo $ADDR