mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
ponmngr: use get_mac_label to read MAC address
This commit is contained in:
parent
d8aaacc4c9
commit
da727b4dc1
1 changed files with 2 additions and 3 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
. /lib/functions/system.sh
|
||||||
|
|
||||||
configure_serial_number() {
|
configure_serial_number() {
|
||||||
# check if serial number is present in the production data
|
# check if serial number is present in the production data
|
||||||
|
|
@ -7,7 +8,7 @@ configure_serial_number() {
|
||||||
if [ ${#production_sn} -eq 12 ]; then
|
if [ ${#production_sn} -eq 12 ]; then
|
||||||
uci set xpon.ani.serial_number="${production_sn}"
|
uci set xpon.ani.serial_number="${production_sn}"
|
||||||
else
|
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 vendor_id="IOPS"
|
||||||
local vssn="${macaddr:4:8}"
|
local vssn="${macaddr:4:8}"
|
||||||
|
|
||||||
|
|
@ -48,7 +49,6 @@ configure_loid_authentication() {
|
||||||
if [ -n "${production_loidpwd}" ]; then
|
if [ -n "${production_loidpwd}" ]; then
|
||||||
uci set xpon.ani.loid_password="${production_loidpwd}"
|
uci set xpon.ani.loid_password="${production_loidpwd}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -s "/etc/config/xpon" ]; then
|
if [ -s "/etc/config/xpon" ]; then
|
||||||
|
|
@ -72,4 +72,3 @@ uci set xpon.ani.enable="1"
|
||||||
configure_serial_number
|
configure_serial_number
|
||||||
configure_ploam_password
|
configure_ploam_password
|
||||||
configure_loid_authentication
|
configure_loid_authentication
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue