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
ce5c3188
Commit
ce5c3188
authored
Apr 08, 2017
by
Igor Pecovnik
Browse files
Non interactive fix and changing SSID for UUID to have true uniqu AP id
parent
9e106488
Changes
1
Hide whitespace changes
Inline
Side-by-side
debian-config
View file @
ce5c3188
...
@@ -234,7 +234,7 @@ while true; do
...
@@ -234,7 +234,7 @@ while true; do
"Nightly"
)
"Nightly"
)
sed
-i
's/apt.armbian.com/beta.armbian.com/'
/etc/apt/sources.list.d/armbian.list
sed
-i
's/apt.armbian.com/beta.armbian.com/'
/etc/apt/sources.list.d/armbian.list
debconf-apt-progress
--
apt-get update
debconf-apt-progress
--
apt-get update
debconf-apt-progress
--
apt-get upgrade
debconf-apt-progress
--
apt-get
-y
upgrade
;;
;;
"Install"
)
"Install"
)
nand-sata-install
nand-sata-install
...
@@ -242,7 +242,7 @@ while true; do
...
@@ -242,7 +242,7 @@ while true; do
"Wireless"
)
"Wireless"
)
# scan for wifi modules
# scan for wifi modules
array
=(
$(
i
w
dev |
grep
Interface |
sed
-e
"s/
\t
Interface//"
)
)
array
=(
$(
nmcl
i dev |
grep
"wifi"
|
awk
'{print $1}'
)
)
declared_wlans
=
0
;
declared_wlans
=
0
;
echo
${#
array
[@]
}
echo
${#
array
[@]
}
for
i
in
"
${
array
[@]
}
"
for
i
in
"
${
array
[@]
}
"
...
@@ -254,13 +254,13 @@ while true; do
...
@@ -254,13 +254,13 @@ while true; do
if
[
$declared_wlans
=
${#
array
[@]
}
]
;
then
if
[
$declared_wlans
=
${#
array
[@]
}
]
;
then
dialog
--title
"Error"
--backtitle
"
$BACKTITLE
"
--no-collapse
--msgbox
"
\n
Wireless network is in use by if-up service. Remove it from config."
7 57
dialog
--title
"Error"
--backtitle
"
$BACKTITLE
"
--no-collapse
--msgbox
"
\n
Wireless network is in use by if-up service. Remove it from config."
7 57
else
else
CURRENT_
SS
ID
=
$(
nmcli
-
m
m
connection show
--active
|
head
-1
|
awk
'{print $
2
}'
)
CURRENT_
UU
ID
=
$(
nmcli
-
f
UUID,TYPE
connection show
--active
|
grep
wireless
|
awk
'{print $
1
}'
)
if
[[
-n
$(
service hostapd status |
grep
-w
active |
grep
-w
running
)
]]
;
then
if
[[
-n
$(
service hostapd status |
grep
-w
active |
grep
-w
running
)
]]
;
then
dialog
--title
"Error"
--backtitle
"
$BACKTITLE
"
--no-collapse
--msgbox
"
\n
Hostapd service is running. Disable it and try again."
7 57
dialog
--title
"Error"
--backtitle
"
$BACKTITLE
"
--no-collapse
--msgbox
"
\n
Hostapd service is running. Disable it and try again."
7 57
exit
exit
elif
[[
-n
$CURRENT_
SS
ID
]]
;
then
elif
[[
-n
$CURRENT_
UU
ID
]]
;
then
dialog
--title
"Info"
--backtitle
"
$BACKTITLE
"
--no-collapse
--yesno
"
\n
Already connected
to
$CURRENT_SSID
.
\n\n
Do you want to disconnect?"
9 57
dialog
--title
"Info"
--backtitle
"
$BACKTITLE
"
--no-collapse
--yesno
"
\n
Already connected
via wireless
.
\n\n
Do you want to disconnect?"
9 57
[[
$?
=
0
]]
&&
nmcli connection down
id
$CURRENT_
SS
ID
[[
$?
=
0
]]
&&
nmcli connection down
uu
id
$CURRENT_
UU
ID
else
else
# disable AP mode on certain adapters
# disable AP mode on certain adapters
wlan_exceptions
"off"
wlan_exceptions
"off"
...
...
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