Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Gluon SSID Changer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
firmware
Gluon SSID Changer
Commits
109bd085
Commit
109bd085
authored
8 years ago
by
rubo77
Browse files
Options
Downloads
Patches
Plain Diff
prevent unknown operand warning on console
parent
759aafed
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
files/lib/gluon/ssid-changer/ssid-changer.sh
+4
-4
4 additions, 4 deletions
files/lib/gluon/ssid-changer/ssid-changer.sh
with
4 additions
and
4 deletions
files/lib/gluon/ssid-changer/ssid-changer.sh
+
4
−
4
View file @
109bd085
...
...
@@ -33,14 +33,14 @@ then
echo
"Gateway TQ is
$GATEWAY_TQ
node is online"
for
HOSTAPD
in
$(
ls
/var/run/hostapd-phy
*
)
;
do
# check status for all physical devices
CURRENT_SSID
=
`
grep
"^ssid=
$ONLINE_SSID
"
$HOSTAPD
|
cut
-d
"="
-f2
`
if
[
$CURRENT_SSID
==
$ONLINE_SSID
]
if
[
"
$CURRENT_SSID
"
==
"
$ONLINE_SSID
"
]
then
echo
"SSID
$CURRENT_SSID
is correct, noting to do"
HUP_NEEDED
=
0
break
fi
CURRENT_SSID
=
`
grep
"^ssid=
$OFFLINE_SSID
"
$HOSTAPD
|
cut
-d
"="
-f2
`
if
[
$CURRENT_SSID
==
$OFFLINE_SSID
]
if
[
"
$CURRENT_SSID
"
==
"
$OFFLINE_SSID
"
]
then
logger
-s
-t
"gluon-offline-ssid"
-p
5
"TQ is
$GATEWAY_TQ
, SSID is
$CURRENT_SSID
, change to
$ONLINE_SSID
"
# write info to syslog
sed
-i
"s~^ssid=
$CURRENT_SSID
~ssid=
$ONLINE_SSID
~"
$HOSTAPD
...
...
@@ -56,14 +56,14 @@ then
echo
"Gateway TQ is
$GATEWAY_TQ
node is considered offline"
for
HOSTAPD
in
$(
ls
/var/run/hostapd-phy
*
)
;
do
# check status for all physical devices
CURRENT_SSID
=
"
$(
grep
"^ssid=
$OFFLINE_SSID
"
$HOSTAPD
|
cut
-d
"="
-f2
)
"
if
[
$CURRENT_SSID
==
$OFFLINE_SSID
]
if
[
"
$CURRENT_SSID
"
==
"
$OFFLINE_SSID
"
]
then
echo
"SSID
$CURRENT_SSID
is correct, noting to do"
HUP_NEEDED
=
0
break
fi
CURRENT_SSID
=
"
$(
grep
"^ssid=
$ONLINE_SSID
"
$HOSTAPD
|
cut
-d
"="
-f2
)
"
if
[
$CURRENT_SSID
==
$ONLINE_SSID
]
if
[
"
$CURRENT_SSID
"
==
"
$ONLINE_SSID
"
]
then
logger
-s
-t
"gluon-offline-ssid"
-p
5
"TQ is
$GATEWAY_TQ
, SSID is
$CURRENT_SSID
, change to
$OFFLINE_SSID
"
sed
-i
"s~^ssid=
$ONLINE_SSID
~ssid=
$OFFLINE_SSID
~"
$HOSTAPD
...
...
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