Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefane Fermigier
neo
Commits
f694d643
Commit
f694d643
authored
Mar 08, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X neotest: Don't fail silently if network address detection fails
(spotted/fixed on my phone in termux)
parent
620b723c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
go/neo/t/neotest
go/neo/t/neotest
+2
-2
No files found.
go/neo/t/neotest
View file @
f694d643
...
@@ -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"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment