Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
ffbs-gluon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
darkbit
ffbs-gluon
Commits
7edb7754
Commit
7edb7754
authored
11 years ago
by
Matthias Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
gluon-mesh-batman-adv: clean up config script
parent
8b069954
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
package/gluon-mesh-batman-adv/files/lib/gluon/upgrade/mesh-batman-adv/initial/010-mesh
+13
-26
13 additions, 26 deletions
.../files/lib/gluon/upgrade/mesh-batman-adv/initial/010-mesh
with
13 additions
and
26 deletions
package/gluon-mesh-batman-adv/files/lib/gluon/upgrade/mesh-batman-adv/initial/010-mesh
+
13
−
26
View file @
7edb7754
#!/bin/sh
.
/lib/functions.sh
.
/lib/gluon/functions/sysconfig.sh
uci
-q
batch
<<
EOF
delete batman-adv.bat0
set batman-adv.bat0='mesh'
set batman-adv.bat0.orig_interval='5000'
commit batman-adv
set network.client='interface'
set network.client.ifname='
$(
sysconfig lan_ifname
)
bat0'
set network.client.type='bridge'
set network.client.proto='dhcpv6'
set network.client.reqprefix='no'
set network.client.peerdns='0'
EOF
local
mainaddr
=
$(
sysconfig primary_mac
)
local
oIFS
=
"
$IFS
"
;
IFS
=
":"
;
set
--
$mainaddr
;
IFS
=
"
$oIFS
"
local
b2mask
=
0x02
local
vpnaddr
=
$(
printf
"%02x:%s:%s:%02x:%s:%s"
$((
0
x
$1
|
$b2mask
))
$2
$3
$((
(
0
x
$4
+
1
)
%
0
x100
))
$5
$6
)
uci_remove batman-adv bat0
uci_add batman-adv mesh bat0
uci_set batman-adv bat0 orig_interval
'5000'
uci_commit batman-adv
uci
set
network.client.macaddr
=
"
$mainaddr
"
uci
set
network.mesh_vpn.macaddr
=
"
$vpnaddr
"
uci_add network interface client
uci_set network client ifname
"
$(
sysconfig lan_ifname
)
bat0"
uci_set network client
type
'bridge'
uci_set network client proto
'dhcpv6'
uci_set network client reqprefix
'no'
uci_set network client peerdns
'0'
uci_set network client macaddr
"
$(
sysconfig primary_mac
)
"
uci
commit network
uci
_
commit network
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