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
c109126b
Unverified
Commit
c109126b
authored
Sep 27, 2020
by
Aristo Chen
Committed by
GitHub
Sep 26, 2020
Browse files
Fix issue for selecting network interface (#114)
parent
0112fdc5
Changes
1
Show whitespace changes
Inline
Side-by-side
debian-config-functions-network
View file @
c109126b
...
@@ -575,7 +575,7 @@ function select_interface ()
...
@@ -575,7 +575,7 @@ function select_interface ()
{
{
IFS
=
$'
\r\n
'
IFS
=
$'
\r\n
'
GLOBIGNORE
=
'*'
GLOBIGNORE
=
'*'
local
ADAPTER
=(
$(
nmcli device status |
grep
ethernet |
awk
'{ print $1 }'
|
grep
-v
lo
)
)
local
ADAPTER
=(
$(
nmcli device status |
awk
'{ print $1 }'
|
grep
-v
lo
|
tail
-n
+2
)
)
local
LIST
=()
local
LIST
=()
for
i
in
"
${
ADAPTER
[@]
}
"
for
i
in
"
${
ADAPTER
[@]
}
"
do
do
...
@@ -596,7 +596,6 @@ function select_interface ()
...
@@ -596,7 +596,6 @@ function select_interface ()
--menu
""
$((
6
+
${
LIST_LENGTH
}))
74 14
"
${
LIST
[@]
}
"
2>&1 1>&3
)
--menu
""
$((
6
+
${
LIST_LENGTH
}))
74 14
"
${
LIST
[@]
}
"
2>&1 1>&3
)
exec
3>&-
exec
3>&-
fi
fi
}
}
...
...
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