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
d9805c4f
Commit
d9805c4f
authored
7 years ago
by
rubo77
Browse files
Options
Downloads
Patches
Plain Diff
uci option -q must be first option now
parent
e597cf90
Branches
configurable
No related tags found
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
+7
-7
7 additions, 7 deletions
files/lib/gluon/ssid-changer/ssid-changer.sh
with
7 additions
and
7 deletions
files/lib/gluon/ssid-changer/ssid-changer.sh
+
7
−
7
View file @
d9805c4f
#!/bin/sh
# only once every timeframe the SSID will change to OFFLINE (set to 1 minute to change every time the router gets offline)
MINUTES
=
"
$(
uci get ssid-changer.settings.switch_timeframe
-q
)
"
MINUTES
=
"
$(
uci
-q
get ssid-changer.settings.switch_timeframe
)
"
# the first few minutes directly after reboot within which an Offline-SSID always may be activated
:
${
MINUTES
:
=1
}
FIRST
=
"
$(
uci get ssid-changer.settings.first
-q
)
"
FIRST
=
"
$(
uci
-q
get ssid-changer.settings.first
)
"
# use something short to leave space for the nodename (no '~' allowed!)
:
${
FIRST
:
=5
}
PREFIX
=
"
$(
uci get ssid-changer.settings.prefix
-q
)
"
PREFIX
=
"
$(
uci
-q
get ssid-changer.settings.prefix
)
"
# generate the ssid with either 'nodename', 'mac' or to use only the prefix: 'none'
:
${
PREFIX
:
=
'FF_OFFLINE_'
}
if
[
"
$(
uci get ssid-changer.settings.enabled
-q
)
"
=
'0'
]
;
then
if
[
"
$(
uci
-q
get ssid-changer.settings.enabled
)
"
=
'0'
]
;
then
DISABLED
=
'1'
else
DISABLED
=
'0'
fi
SETTINGS_SUFFIX
=
"
$(
uci get ssid-changer.settings.suffix
-q
)
"
SETTINGS_SUFFIX
=
"
$(
uci
-q
get ssid-changer.settings.suffix
)
"
if
[
$SETTINGS_SUFFIX
=
'nodename'
]
;
then
SUFFIX
=
"
$(
uname
-n
)
"
...
...
@@ -33,7 +33,7 @@ if [ $SETTINGS_SUFFIX = 'nodename' ]; then
SUFFIX
=
${
SUFFIX
:0:
$HALF
}
...
${
SUFFIX
:
$SKIP
:
${#
SUFFIX
}}
fi
elif
[
$SETTINGS_SUFFIX
=
'mac'
]
;
then
SUFFIX
=
"
$(
uci get network.bat0.macaddr
-q
)
"
SUFFIX
=
"
$(
uci
-q
get network.bat0.macaddr
)
"
else
# 'none'
SUFFIX
=
''
...
...
@@ -43,7 +43,7 @@ OFFLINE_SSID="$PREFIX$SUFFIX"
# TODO: ffac tq limits has to be implemented here if enabled
ONLINE_SSID
=
"
$(
uci get wireless.client_radio0.ssid
-q
)
"
ONLINE_SSID
=
"
$(
uci
-q
get wireless.client_radio0.ssid
)
"
# if for whatever reason ONLINE_SSID is NULL
:
${
ONLINE_SSID
:
=
"FREIFUNK"
}
...
...
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