mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
ponmngr: airoha: procdify airoha pon init and add IOPG prefix to sn
This commit is contained in:
parent
e62792d397
commit
30bb56e9bf
3 changed files with 12 additions and 8 deletions
|
|
@ -3,12 +3,17 @@
|
|||
. /lib/functions.sh
|
||||
|
||||
init_xpon() {
|
||||
# For now use the base mac address as the omci serial number
|
||||
/userfs/bin/omcicfgCmd set sn $(fw_printenv -n ethaddr | tr -d ':' | tr 'a-z' 'A-Z')
|
||||
macaddr="$(fw_printenv -n ethaddr | tr -d ':' | tr 'a-z' 'A-Z')"
|
||||
|
||||
/userfs/bin/ponmgr_cfg &
|
||||
sleep 1
|
||||
/userfs/bin/omci &
|
||||
# For now use IOPG + last 8 digits of the base mac address as the omci serial number
|
||||
/userfs/bin/omcicfgCmd set sn IOPG${macaddr:4:8}
|
||||
|
||||
procd_open_instance ponmgr_cfg
|
||||
procd_set_param command /userfs/bin/ponmgr_cfg
|
||||
procd_close_instance
|
||||
procd_open_instance omci
|
||||
procd_set_param command /userfs/bin/omci
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
deinit_xpon() {
|
||||
|
|
|
|||
|
|
@ -9,10 +9,11 @@ init_xpon() {
|
|||
procd_open_instance pon_daemon
|
||||
procd_set_param command omcid start -n
|
||||
procd_close_instance
|
||||
|
||||
}
|
||||
|
||||
deinit_xpon() {
|
||||
# stopping omcid does not bring down the pon link, which should happen
|
||||
# if ANI is disabled or stopped (go to O1)
|
||||
gponctl stop
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@ start_service() {
|
|||
}
|
||||
|
||||
stop_service() {
|
||||
# stopping omcid does not bring down the pon link, which should happen
|
||||
# if ANI is disabled or stopped (go to O1)
|
||||
deinit_xpon
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue