mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
xpon: Add support to configure ONU version.
Some customer has their own requirments for the ONU version string. The following commit adds support for configuring this value via UCI. For Broadcom we will need to add additional support in the SDK.
This commit is contained in:
parent
5b702e1991
commit
d6333aa476
3 changed files with 22 additions and 0 deletions
|
|
@ -34,9 +34,18 @@ set_loid_authentication() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_onu_version() {
|
||||||
|
local onu_version="$1"
|
||||||
|
|
||||||
|
[ -z "${onu_version}" ] && return
|
||||||
|
|
||||||
|
/userfs/bin/omcicfgCmd set onuVersion "${onu_version}"
|
||||||
|
}
|
||||||
|
|
||||||
apply_xpon_uci_config() {
|
apply_xpon_uci_config() {
|
||||||
configure_loid_authentication
|
configure_loid_authentication
|
||||||
configure_equipment_id
|
configure_equipment_id
|
||||||
|
configure_onu_version
|
||||||
}
|
}
|
||||||
|
|
||||||
init_xpon() {
|
init_xpon() {
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,13 @@ set_loid_authentication() {
|
||||||
json_add_string "loid_password" "$loid_password"
|
json_add_string "loid_password" "$loid_password"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_onu_version() {
|
||||||
|
local onu_version="$1"
|
||||||
|
[ -z "${onu_version}" ] && return
|
||||||
|
|
||||||
|
json_add_string "onu_version" "${onu_version}"
|
||||||
|
}
|
||||||
|
|
||||||
apply_xpon_uci_config() {
|
apply_xpon_uci_config() {
|
||||||
local sn
|
local sn
|
||||||
|
|
||||||
|
|
@ -38,6 +45,7 @@ apply_xpon_uci_config() {
|
||||||
json_add_string "serial_number" "$sn"
|
json_add_string "serial_number" "$sn"
|
||||||
configure_loid_authentication
|
configure_loid_authentication
|
||||||
configure_equipment_id
|
configure_equipment_id
|
||||||
|
configure_onu_version
|
||||||
json_close_object
|
json_close_object
|
||||||
json_dump > /tmp/xpon.json
|
json_dump > /tmp/xpon.json
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,3 +13,8 @@ configure_loid_authentication() {
|
||||||
set_loid_authentication "${loid}" "${loid_pwd}"
|
set_loid_authentication "${loid}" "${loid_pwd}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configure_onu_version() {
|
||||||
|
local onu_version="$(uci -q get xpon.ani.onu_version)"
|
||||||
|
|
||||||
|
set_onu_version "${onu_version}"
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue