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
127cc2f1
Commit
127cc2f1
authored
Nov 30, 2017
by
Igor Pecovnik
Browse files
Locales bugfix. When using some other languages few functions were not working properly
parent
64a36b00
Changes
2
Show whitespace changes
Inline
Side-by-side
debian-config-jobs
View file @
127cc2f1
...
...
@@ -247,7 +247,7 @@ function jobs ()
#
"Hotspot"
)
systemctl daemon-reload
CURRENT_UUID
=
$(
nmcli
-f
DEVICE,TYPE,STATE device status |
grep
-w
" wifi "
|
grep
-w
" disconnected"
)
CURRENT_UUID
=
$(
LC_ALL
=
C
nmcli
-f
DEVICE,TYPE,STATE device status |
grep
-w
" wifi "
|
grep
-w
" disconnected"
)
if
[[
-n
$(
service hostapd status |
grep
-w
active |
grep
-w
running
)
]]
;
then
if
[[
-n
$HOSTAPDBRIDGE
]]
;
then
dialog
--title
" Hostapd service is running "
--colors
--backtitle
"
$BACKTITLE
"
--help-button
\
...
...
@@ -575,7 +575,7 @@ function jobs ()
# Remove automatic wifi conections
#
"Forget"
)
nmcli
--fields
UUID,TIMESTAMP-REAL,TYPE con show |
grep
wireless |
awk
'{print $1}'
|
while
read
line
;
\
LC_ALL
=
C
nmcli
--fields
UUID,TIMESTAMP-REAL,TYPE con show |
grep
wireless |
awk
'{print $1}'
|
while
read
line
;
\
do
nmcli con delete uuid
$line
;
done
>
/dev/null
;;
...
...
debian-config-submenu
View file @
127cc2f1
...
...
@@ -401,7 +401,7 @@ function get_wlan_interface ()
IFS
=
$'
\r\n
'
GLOBIGNORE
=
'*'
WLAN_INTERFACES
=(
$(
nmcli
--wait
10 dev status |
grep
wifi |
grep
disconnected |awk
'{print $1}'
)
)
WLAN_INTERFACES
=(
$(
LC_ALL
=
C
nmcli
--wait
10 dev status |
grep
wifi |
grep
disconnected |awk
'{print $1}'
)
)
local
LIST
=()
for
i
in
"
${
WLAN_INTERFACES
[@]
}
"
do
...
...
@@ -595,7 +595,7 @@ while true; do
HOSTAPDCLIENTS
=
$(
hostapd_cli all_sta 2> /dev/null |
grep
connected_time |
wc
-l
)
LIST+
=(
"Hotspot"
"Manage active wireless access point"
)
else
[[
-n
$(
nmcli device status |
grep
wifi |
grep
-w
disconnected
)
]]
&&
LIST+
=(
"Hotspot"
"Create WiFi access point"
)
[[
-n
$(
LC_ALL
=
C
nmcli device status |
grep
wifi |
grep
-w
disconnected
)
]]
&&
LIST+
=(
"Hotspot"
"Create WiFi access point"
)
fi
...
...
@@ -607,7 +607,7 @@ while true; do
fi
if
[[
-n
$(
nmcli device status |
grep
wifi |
grep
-v
unavailable |
grep
-v
unmanaged
)
]]
;
then
if
[[
-n
$(
LC_ALL
=
C
nmcli device status |
grep
wifi |
grep
-v
unavailable |
grep
-v
unmanaged
)
]]
;
then
LIST+
=(
"WiFi"
"Manage wireless networking"
)
else
LIST+
=(
"Clear"
"Clear possible blocked interfaces"
)
...
...
@@ -633,13 +633,13 @@ while true; do
# count number of menu items to adjust window sizee
LISTLENGHT
=
"
$((
12
+
${#
LIST
[@]
}
/
2
))
"
BOXLENGHT
=
${#
LIST
[@]
}
WIFICONNECTED
=
$(
nmcli
-f
NAME,TYPE connection show
--active
|
grep
wireless |
awk
'NF{NF-=1};1'
)
WIFICONNECTED
=
$(
LC_ALL
=
C
nmcli
-f
NAME,TYPE connection show
--active
|
grep
wireless |
awk
'NF{NF-=1};1'
)
local
disclaimer
=
""
local
ipadd
=
$(
ip
-4
addr show dev
$DEFAULT_ADAPTER
|
awk
'/inet/ {print $2}'
|
cut
-d
'/'
-f1
)
if
[[
-n
$(
nmcli device status |
grep
wlan0 |
grep
connected
)
]]
;
then
if
[[
-n
$(
LC_ALL
=
C
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
IP (
$DEFAULT_ADAPTER
) via IFUPDOWN:
\Z
1
${
ipadd
}
\n\Z
0 "
...
...
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