ponmngr: use get_mac_label to read MAC address

This commit is contained in:
Erik Karlsson 2025-09-17 14:37:32 +02:00
parent d8aaacc4c9
commit da727b4dc1

View file

@ -1,5 +1,6 @@
#!/bin/sh
. /lib/functions/system.sh
configure_serial_number() {
# check if serial number is present in the production data
@ -7,7 +8,7 @@ configure_serial_number() {
if [ ${#production_sn} -eq 12 ]; then
uci set xpon.ani.serial_number="${production_sn}"
else
local macaddr="$(fw_printenv -n ethaddr | tr -d ':' | tr 'a-z' 'A-Z')"
local macaddr="$(get_mac_label | tr -d ':' | tr 'a-z' 'A-Z')"
local vendor_id="IOPS"
local vssn="${macaddr:4:8}"
@ -48,7 +49,6 @@ configure_loid_authentication() {
if [ -n "${production_loidpwd}" ]; then
uci set xpon.ani.loid_password="${production_loidpwd}"
fi
}
if [ -s "/etc/config/xpon" ]; then
@ -72,4 +72,3 @@ uci set xpon.ani.enable="1"
configure_serial_number
configure_ploam_password
configure_loid_authentication