mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
ponmngr: handling the loid authentication
This commit is contained in:
parent
dfa0414918
commit
d19c85ebde
3 changed files with 24 additions and 0 deletions
|
|
@ -26,6 +26,19 @@ set_equipment_id() {
|
||||||
/userfs/bin/omcicfgCmd set equipmentId ${eqid}
|
/userfs/bin/omcicfgCmd set equipmentId ${eqid}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_loid_authentication() {
|
||||||
|
local loid=$1
|
||||||
|
local loid_pwd=$2
|
||||||
|
|
||||||
|
[ -z "$loid" ] && return
|
||||||
|
|
||||||
|
/userfs/bin/omcicfgCmd set loid ${loid}
|
||||||
|
|
||||||
|
if [ -n "$loid_pwd" ]; then
|
||||||
|
/userfs/bin/omcicfgCmd set loid_password ${loid_pwd}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
init_xpon() {
|
init_xpon() {
|
||||||
# don't start pon daemons if xpon module is not loaded
|
# don't start pon daemons if xpon module is not loaded
|
||||||
[ -d /sys/module/xpon ] || return
|
[ -d /sys/module/xpon ] || return
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,10 @@ set_equipment_id() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_loid_authentication() {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
generate_xpon_json() {
|
generate_xpon_json() {
|
||||||
eqid="$(uci -q get xpon.ani.equipment_id)"
|
eqid="$(uci -q get xpon.ani.equipment_id)"
|
||||||
sn="$(uci -q get xpon.ani.serial_number)"
|
sn="$(uci -q get xpon.ani.serial_number)"
|
||||||
|
|
|
||||||
|
|
@ -29,10 +29,17 @@ configure_equipment_id() {
|
||||||
set_equipment_id $eqid
|
set_equipment_id $eqid
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configure_loid_authentication() {
|
||||||
|
loid="$(uci -q get xpon.ani.loid)"
|
||||||
|
loid_pwd="$(uci -q get xpon.ani.loid_password)"
|
||||||
|
set_loid_authentication $loid $loid_pwd
|
||||||
|
}
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
if [ "$(uci -q get xpon.ani.enable)" == "1" ]; then
|
if [ "$(uci -q get xpon.ani.enable)" == "1" ]; then
|
||||||
configure_serial_number
|
configure_serial_number
|
||||||
configure_equipment_id
|
configure_equipment_id
|
||||||
|
configure_loid_authentication
|
||||||
init_xpon
|
init_xpon
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue