Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFS Gluon
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
FFS Gluon
Commits
80de4a69
Unverified
Commit
80de4a69
authored
8 years ago
by
Matthias Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
gluon-client-bridge: don't depend on luci.ip
parent
e665bfe6
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
package/gluon-client-bridge/luasrc/lib/gluon/upgrade/300-gluon-client-bridge-network
+4
-5
4 additions, 5 deletions
.../luasrc/lib/gluon/upgrade/300-gluon-client-bridge-network
with
4 additions
and
5 deletions
package/gluon-client-bridge/luasrc/lib/gluon/upgrade/300-gluon-client-bridge-network
+
4
−
5
View file @
80de4a69
...
@@ -4,15 +4,14 @@ local site = require 'gluon.site_config'
...
@@ -4,15 +4,14 @@ local site = require 'gluon.site_config'
local
sysconfig
=
require
'gluon.sysconfig'
local
sysconfig
=
require
'gluon.sysconfig'
local
util
=
require
'gluon.util'
local
util
=
require
'gluon.util'
local
ip
=
require
'luci.ip'
local
uci
=
require
(
'simple-uci'
).
cursor
()
local
uci
=
require
(
'simple-uci'
).
cursor
()
local
ip4
,
netmask
,
ip6
local
ip4
,
ip6
if
site
.
next_node
.
ip4
then
if
site
.
next_node
.
ip4
then
ip4
=
site
.
next_node
.
ip4
local
plen
=
site
.
prefix4
:
match
(
'/%d+$'
)
netmask
=
ip
.
IPv4
(
site
.
prefix4
):
mask
():
string
()
ip4
=
site
.
next_node
.
ip4
..
plen
end
end
if
site
.
next_node
.
ip6
then
if
site
.
next_node
.
ip6
then
...
@@ -25,7 +24,6 @@ uci:section('network', 'interface', 'client',
...
@@ -25,7 +24,6 @@ uci:section('network', 'interface', 'client',
proto
=
'static'
,
proto
=
'static'
,
macaddr
=
site
.
next_node
.
mac
,
macaddr
=
site
.
next_node
.
mac
,
ipaddr
=
ip4
,
ipaddr
=
ip4
,
netmask
=
netmask
,
ip6addr
=
ip6
,
ip6addr
=
ip6
,
}
}
)
)
...
@@ -33,6 +31,7 @@ uci:section('network', 'interface', 'client',
...
@@ -33,6 +31,7 @@ uci:section('network', 'interface', 'client',
uci
:
delete
(
'network'
,
'client'
,
'reqprefix'
)
uci
:
delete
(
'network'
,
'client'
,
'reqprefix'
)
uci
:
delete
(
'network'
,
'client'
,
'peerdns'
)
uci
:
delete
(
'network'
,
'client'
,
'peerdns'
)
uci
:
delete
(
'network'
,
'client'
,
'sourcefilter'
)
uci
:
delete
(
'network'
,
'client'
,
'sourcefilter'
)
uci
:
delete
(
'network'
,
'client'
,
'netmask'
)
local
interfaces
=
uci
:
get
(
'network'
,
'client'
,
'ifname'
)
or
{}
local
interfaces
=
uci
:
get
(
'network'
,
'client'
,
'ifname'
)
or
{}
...
...
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