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
e7bad359
Commit
e7bad359
authored
Sep 26, 2017
by
Igor Pecovnik
Browse files
Minot bugfixes and adding iper3 server toggle to networking menu.
parent
b4e0bc66
Changes
2
Hide whitespace changes
Inline
Side-by-side
debian-config-jobs
View file @
e7bad359
...
...
@@ -189,6 +189,17 @@ function jobs ()
fi
;;
# Connect to wireless access point
#
"Iperf3"
)
# disable AP mode on certain adapters
if
pgrep
-x
"iperf3"
>
/dev/null
then
pkill iperf3
else
iperf3
-s
-D
fi
;;
# Connect to wireless access point
#
...
...
debian-config-submenu
View file @
e7bad359
...
...
@@ -562,6 +562,14 @@ while true; do
fi
if
pgrep
-x
"iperf3"
>
/dev/null
then
LIST+
=(
"Iperf3"
"Disable network throughput tests daemon"
)
else
LIST+
=(
"Iperf3"
"Enable network throughput tests daemon"
)
fi
if
[[
-n
$(
nmcli device status |
grep
wifi |
grep
-v
unavailable |
grep
-v
unmanaged
)
]]
;
then
LIST+
=(
"WiFi"
"Manage wireless networking"
)
else
...
...
@@ -577,7 +585,7 @@ while true; do
LIST+
=(
"Forget"
"Disconnect and forget all wireless connections"
)
# count number of menu items to adjust window sizee
LISTLENGHT
=
"
$((
1
3
+
${#
LIST
[@]
}
/
2
))
"
LISTLENGHT
=
"
$((
1
2
+
${#
LIST
[@]
}
/
2
))
"
BOXLENGHT
=
${#
LIST
[@]
}
WIFICONNECTED
=
$(
nmcli
-f
NAME,TYPE connection show
--active
|
grep
wireless |
awk
'NF{NF-=1};1'
)
...
...
@@ -585,13 +593,12 @@ while true; do
local
ipadd
=
$(
ip
-4
addr show dev
$DEFAULT_ADAPTER
|
awk
'/inet/ {print $2}'
|
cut
-d
'/'
-f1
)
if
[[
-n
$(
grep
$DEFAULT_ADAPTER
/etc/network/interfaces |
grep
static
)
]]
;
then
local
ifup
=
"
\n
Static IP (
$DEFAULT_ADAPTER
) via IFUPDOWN:
\Z
1
${
ipadd
}
\n\Z
0 "
elif
[[
-n
$(
grep
$DEFAULT_ADAPTER
/etc/network/interfaces |
grep
dhcp
)
]]
;
then
local
ifup
=
"
\n
Dynamic IP (
$DEFAULT_ADAPTER
) via IFUPDOWN:
\Z
1
${
ipadd
}
\n\Z
0 "
if
[[
-n
$(
nmcli device status |
grep
wlan0 |
grep
connected
)
]]
;
then
local
ifup
=
"
\n
IP (
$DEFAULT_ADAPTER
) via Network Manager:
\Z
1
${
ipadd
}
\n\Z
0 "
else
local
ifup
=
"
\n
Dynamic
IP (
$DEFAULT_ADAPTER
) via
Network Manager
:
\Z
1
${
ipadd
}
\n\Z
0 "
local
ifup
=
"
\n
IP (
$DEFAULT_ADAPTER
) via
IFUPDOWN
:
\Z
1
${
ipadd
}
\n\Z
0 "
fi
disclaimer
=
"
$ifup
"
if
[[
-n
$WIFICONNECTED
]]
;
then
...
...
@@ -613,9 +620,7 @@ while true; do
if
[
-n
$chip
]
||
[
"
$HOSTAPDCLIENTS
"
-gt
"0"
]
;
then
LISTLENGHT
=
$((
LISTLENGHT+2
))
;
fi
disclaimer
=
$disclaimer
$"
\n
"
;
fi
disclaimer
=
$disclaimer
"
\n\Z
1Note
\Z
n: wireless networking in Linux is problematic.
\
Our tools make it easy for some cases but can't enable AP on every random WiFi chip. If this tool fail, you are on your own.
\n
"
disclaimer
=
$disclaimer
"
\n\Z
1Note
\Z
n: This tool can be successful only when drivers are in good shape. If autodetection fails, you are on your own.
\n
"
exec
3>&1
selection
=
$(
dialog
--backtitle
"
$BACKTITLE
"
--colors
--title
" Wired, Wireless, Bluetooth, Hotspot "
--clear
\
...
...
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