Commit f694d643 authored by Kirill Smelkov's avatar Kirill Smelkov

X neotest: Don't fail silently if network address detection fails

(spotted/fixed on my phone in termux)
parent 620b723c
...@@ -174,8 +174,8 @@ init_net() { ...@@ -174,8 +174,8 @@ init_net() {
# 2: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000 # 2: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
# inet6 2401:5180:0:1d:429a:e612:c957:29/64 scope global noprefixroute dynamic # inet6 2401:5180:0:1d:429a:e612:c957:29/64 scope global noprefixroute dynamic
# valid_lft 86232sec preferred_lft 14232sec # valid_lft 86232sec preferred_lft 14232sec
myaddr4v=(`ip -4 addr show scope global |grep inet |awk '{print $2}' |sed -e 's|/.*$||'`) myaddr4v=(`ip -4 addr show scope global |grep inet |awk '{print $2}' |sed -e 's|/.*$||'`) || :
myaddr6v=(`ip -6 addr show scope global |grep inet |awk '{print $2}' |sed -e 's|/.*$||'`) myaddr6v=(`ip -6 addr show scope global |grep inet |awk '{print $2}' |sed -e 's|/.*$||'`) || :
test "${#myaddr4v[@]}" -gt 0 || die "init_net: cannot determine my IPv4 network addresses" test "${#myaddr4v[@]}" -gt 0 || die "init_net: cannot determine my IPv4 network addresses"
test "${#myaddr6v[@]}" -gt 0 || die "init_net: cannot determine my IPv6 network addresses" test "${#myaddr6v[@]}" -gt 0 || die "init_net: cannot determine my IPv6 network addresses"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment