Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Markus Gothe
iopsys
Commits
1fb879fc
Commit
1fb879fc
authored
Oct 12, 2021
by
Omar Kallel
Browse files
icwmp: get dhcp 43 option in icwmp hotplug script instead of netifd package
parent
a3fd03c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
icwmp/Makefile
View file @
1fb879fc
...
...
@@ -8,7 +8,7 @@
include
$(TOPDIR)/rules.mk
PKG_NAME
:=
icwmp
PKG_VERSION
:=
8.2.
2
-2021-10-1
2
PKG_VERSION
:=
8.2.
3
-2021-10-1
3
PKG_FIXUP
:=
autoreconf
PKG_SOURCE_URL
:=
https://dev.iopsys.eu/iopsys/icwmp.git
PKG_SOURCE_PROTO
:=
git
...
...
icwmp/files/etc/hotplug.d/iface/90-icwmp
View file @
1fb879fc
...
...
@@ -2,6 +2,7 @@
.
/lib/functions/network.sh
[
"
$ACTION
"
==
"ifup"
]
||
exit
0
[
-f
/etc/config/cwmp
]
||
exit
0
...
...
@@ -23,7 +24,7 @@ handle_icwmp_restart() {
local
ifname
=
"
$(
uci
-q
get network.
$INTERFACE
.ifname
)
"
[
"
${
ifname
:0:1
}
"
==
"@"
]
&&
exit
0
mkdir
-p
/tmp/ipv4
network_flush_cache
...
...
@@ -63,6 +64,36 @@ handle_icwmp_restart() {
network_get_device curdev
$INTERFACE
[
-n
"
$curdev
"
]
&&
echo
$curdev
>
$devfile
||
rm
-f
$devfile
local
wan_iface
=
`
uci get cwmp.cpe.default_wan_interface
`
local
vendorspecinf
=
`
ubus call network.interface.wan status | jsonfilter
-e
"@.data.vendorspecinf"
`
[
-n
"
$vendorspecinf
"
]
&&
{
local
url
=
""
case
$vendorspecinf
in
http://
*
|
https://
*
)
url
=
"
$vendorspecinf
"
;;
*
)
for
optval
in
$vendorspecinf
;
do
case
$optval
in
1
=
*
)
url
=
"
$(
echo
$optval
|
cut
-d
"="
-f2-
)
"
;;
esac
done
;;
esac
if
[
!
-f
/var/state/cwmp
]
;
then
touch
/var/state/cwmp
fi
uci
-q
-c
/var/state/ get cwmp.acs
if
[
"
$?
"
-ne
0
]
;
then
unnamed
=
`
uci
-q
-c
/var/state/ add cwmp acs
`
uci
-c
/var/state/
-q
rename cwmp.
$unnamed
=
'acs'
fi
[
-n
"
$url
"
]
&&
uci
-c
/var/state
-q
set
cwmp.acs.dhcp_url
=
"
$url
"
uci
-c
/var/state commit cwmp
}
local
prevopt43url
=
""
local
curopt43url
=
""
local
opt43urlfile
=
/tmp/ipv4/
$INTERFACE
-opt43url
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment