Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Config
Commits
edcaa4c8
Commit
edcaa4c8
authored
Jan 11, 2018
by
Igor Pecovnik
Browse files
Show IP address if assigned when choosing default adaptor
parent
e716779f
Changes
1
Hide whitespace changes
Inline
Side-by-side
debian-config-submenu
View file @
edcaa4c8
...
@@ -511,7 +511,8 @@ function select_default_interface ()
...
@@ -511,7 +511,8 @@ function select_default_interface ()
local
LIST
=()
local
LIST
=()
for
i
in
"
${
ADAPTER
[@]
}
"
for
i
in
"
${
ADAPTER
[@]
}
"
do
do
LIST+
=(
"
${
i
[0]//[[
:blank:]]/
}
"
""
)
local
IPADDR
=
$(
ip
-4
addr show dev
${
i
[0]
}
|
awk
'/inet/ {print $2}'
|
cut
-d
'/'
-f1
)
LIST+
=(
"
${
i
[0]//[[
:blank:]]/
}
"
"
${
IPADDR
}
"
)
done
done
LIST_LENGHT
=
$((${#
LIST
[@]
}
/
2
))
;
LIST_LENGHT
=
$((${#
LIST
[@]
}
/
2
))
;
if
[
"
$LIST_LENGHT
"
-eq
0
]
;
then
if
[
"
$LIST_LENGHT
"
-eq
0
]
;
then
...
...
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