Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
5c182edb
Commit
5c182edb
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Terminale wpa_supplicant before restart of wifi
parent
4db154ff
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/freedombone-utils-wifi
+4
-1
4 additions, 1 deletion
src/freedombone-utils-wifi
src/freedombone-wifi
+15
-13
15 additions, 13 deletions
src/freedombone-wifi
with
19 additions
and
14 deletions
src/freedombone-utils-wifi
+
4
−
1
View file @
5c182edb
...
...
@@ -70,6 +70,7 @@ function setup_wifi_atheros {
cd
$curr_dir
update_wifi_adaptors
if
[
$IFACE
]
;
then
wpa_cli
-i
${
IFACE
}
terminate
ifdown
--force
$IFACE
ifup
$IFACE
fi
...
...
@@ -208,7 +209,8 @@ function hotspot_off {
fi
systemctl restart network-manager
ifdown
--force
$WIFI_INTERFACE
wpa_cli
-i
${
WIFI_INTERFACE
}
terminate
ifdown
--force
${
WIFI_INTERFACE
}
}
function
hotspot_on
{
...
...
@@ -494,6 +496,7 @@ function disable_wifi {
echo
'# Include files from /etc/network/interfaces.d:'
>>
/etc/network/interfaces
echo
'source-directory /etc/network/interfaces.d'
>>
/etc/network/interfaces
systemctl restart network-manager
wpa_cli
-i
${
WIFI_INTERFACE
}
terminate
ifdown
--force
${
WIFI_INTERFACE
}
else
networks_from_file
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-wifi
+
15
−
13
View file @
5c182edb
...
...
@@ -85,8 +85,9 @@ do
WIFI_INTERFACE
=
${
1
}
wifi_interface_specified
=
1
write_config_param
"WIFI_INTERFACE"
"
$WIFI_INTERFACE
"
ifdown
--force
$WIFI_INTERFACE
ifup
$WIFI_INTERFACE
wpa_cli
-i
${
WIFI_INTERFACE
}
terminate
ifdown
--force
${
WIFI_INTERFACE
}
ifup
${
WIFI_INTERFACE
}
;;
-t
|
--type
)
shift
...
...
@@ -129,41 +130,42 @@ do
shift
done
if
[
$NETWORKS_INTERACTIVE
]
;
then
if
[
$
{
NETWORKS_INTERACTIVE
}
]
;
then
create_networks_interactive
exit
0
fi
if
[
!
$wifi_interface_specified
]
;
then
if
[
!
$
{
wifi_interface_specified
}
]
;
then
update_wifi_adaptors
if
[
!
$IFACE
]
;
then
echo
$'No wifi adaptors were found'
exit
872356
fi
WIFI_INTERFACE
=
$IFACE
WIFI_INTERFACE
=
$
{
IFACE
}
echo
"Adaptor:
$WIFI_INTERFACE
"
write_config_param
"WIFI_INTERFACE"
"
$WIFI_INTERFACE
"
ifdown
--force
$WIFI_INTERFACE
ifup
$WIFI_INTERFACE
wpa_cli
-i
${
WIFI_INTERFACE
}
terminate
ifdown
--force
${
WIFI_INTERFACE
}
ifup
${
WIFI_INTERFACE
}
fi
if
[
$WIFI_DISABLE
]
;
then
disable_wifi
$WIFI_DISABLE
if
[
$
{
WIFI_DISABLE
}
]
;
then
disable_wifi
$
{
WIFI_DISABLE
}
remove_config_param
"WIFI_INTERFACE"
exit
0
fi
if
[
-f
$WIFI_NETWORKS_FILE
]
;
then
if
[
-f
$
{
WIFI_NETWORKS_FILE
}
]
;
then
networks_from_file
exit
0
fi
if
[
!
$WIFI_SSID
]
;
then
if
[
!
$
{
WIFI_SSID
}
]
;
then
echo
$'No SSID given'
exit
1
fi
if
[[
$WIFI_HOTSPOT
!=
'no'
]]
;
then
if
[[
$
{
WIFI_HOTSPOT
}
!=
'no'
]]
;
then
hotspot_on
exit
0
else
...
...
@@ -177,7 +179,7 @@ if [[ "$WIFI_TYPE" != 'none' && "$WIFI_TYPE" != 'open' ]]; then
fi
fi
if
[[
$WIFI_TYPE
==
'wpa2-psk'
]]
;
then
if
[[
$
{
WIFI_TYPE
}
==
'wpa2-psk'
]]
;
then
if
[
!
-d
/etc/wpa_supplicant
]
;
then
echo
$'wpasupplicant package is not installed'
exit
3
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment