mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-01-28 01:47:19 +01:00
Don't start ponmngr microservice in PtP-mode.
This commit is contained in:
parent
ad31d21380
commit
980779a583
3 changed files with 45 additions and 1 deletions
|
|
@ -1,6 +1,44 @@
|
|||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
apply_extra_xpon_config() {
|
||||
local wanport enabled updated
|
||||
|
||||
if [ -f /etc/board.json ]; then
|
||||
json_init
|
||||
json_load_file /etc/board.json
|
||||
json_select network
|
||||
json_select wan 2>/dev/null
|
||||
json_get_var wanport device
|
||||
json_select ..
|
||||
json_select ..
|
||||
json_cleanup
|
||||
|
||||
if [ -f /etc/bbfdm/services/ponmngr.json ]; then
|
||||
json_init
|
||||
json_load_file /etc/bbfdm/services/ponmngr.json
|
||||
json_select daemon
|
||||
json_get_var enabled enable
|
||||
|
||||
if [ "$wanport" = "pon" ]; then
|
||||
updated=1
|
||||
else
|
||||
updated=0
|
||||
fi
|
||||
|
||||
# Avoid writing to flash if not necessary, since it might affect wear-leveling
|
||||
if [ "$enabled" != "$updated" ]; then
|
||||
json_add_string enable "$updated"
|
||||
json_select ..
|
||||
json_pretty
|
||||
json_dump > /etc/bbfdm/services/ponmngr.json
|
||||
fi
|
||||
json_cleanup
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
set_serial_number() {
|
||||
local vendor_id="$1"
|
||||
|
|
@ -46,6 +84,7 @@ apply_xpon_uci_config() {
|
|||
configure_loid_authentication
|
||||
configure_equipment_id
|
||||
configure_onu_version
|
||||
apply_extra_xpon_config
|
||||
}
|
||||
|
||||
init_xpon() {
|
||||
|
|
@ -65,4 +104,3 @@ init_xpon() {
|
|||
deinit_xpon() {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
. /lib/functions.sh
|
||||
|
||||
apply_extra_xpon_config() {
|
||||
return
|
||||
}
|
||||
|
||||
set_serial_number() {
|
||||
local vendor_id="$1"
|
||||
local vssn="$2"
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@ start_service() {
|
|||
configure_serial_number
|
||||
apply_xpon_uci_config
|
||||
init_xpon
|
||||
else
|
||||
apply_extra_xpon_config
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue