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
de582990
Commit
de582990
authored
8 years ago
by
fuzzle
Browse files
Options
Downloads
Patches
Plain Diff
add wifi renewal after 5 min, and fastd retry after 7 minutes offline
parent
c50f2e60
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/emergency.sh
+6
-2
6 additions, 2 deletions
files/lib/gluon/ssid-changer/emergency.sh
with
6 additions
and
2 deletions
files/lib/gluon/ssid-changer/emergency.sh
+
6
−
2
View file @
de582990
...
...
@@ -14,7 +14,7 @@ echo 950 > /proc/$(pgrep /usr/sbin/batadv-vis)/oom_score_adj # batvis
# if we see bat GW just exit
netz
=
$(
batctl gwl
-H
|wc
-l
)
if
[
$netz
-ne
0
]
;
then
logger
"emergency
found network, exiting"
echo
"
$0
found
GW in
network, exiting"
|logger
echo
0
>
/tmp/emergency
exit
0
fi
...
...
@@ -27,7 +27,11 @@ touch /tmp/emergency
counter
=
$(
cat
/tmp/emergency
)
if
[
-z
$counter
]
;
then
counter
=
0
;
fi
if
[
$counter
-lt
10
]
then
let
counter+
=
1
;
echo
$counter
>
/tmp/emergency
then
let
counter+
=
1
echo
$counter
>
/tmp/emergency
if
[
$counter
-eq
5
]
;
then
echo
"
$0
- 5 min offline - try wifi"
|logger
;
wifi
;
fi
if
[
$counter
-eq
7
]
;
then
echo
"
$0
- 7 min offline - try restart fastd"
|logger
;
/etc/init.d/fastd restart
;
fi
else
reboot
fi
echo
$counter
...
...
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