Use ipcinfo --xm-mac everywhere

pull/389/head
Dmitry Ilyin 2022-08-20 14:48:54 +03:00
parent dbd0484417
commit b15041fe3e
17 changed files with 17 additions and 17 deletions

View File

@ -33,7 +33,7 @@ start() {
logger -s -p daemon.info -t anyka "Check MAC for Xiongmai devices"
if [ "$(fw_printenv -n ethaddr)" = "00:00:23:34:45:66" ]; then
logger -s -p daemon.info -t anyka "The eth0 interface has a lousy MAC, let's try to change it.."
XMMAC="$(ipcinfo --xm_mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t anyka "It is not possible to install a new MAC on the eth0 interface.."
XMMAC="$(ipcinfo --xm-mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t anyka "It is not possible to install a new MAC on the eth0 interface.."
else
logger -s -p daemon.info -t anyka "The eth0 interface has a correct MAC - $(fw_printenv -n ethaddr)"
fi

View File

@ -33,7 +33,7 @@ start() {
logger -s -p daemon.info -t anyka "Check MAC for Xiongmai devices"
if [ "$(fw_printenv -n ethaddr)" = "00:00:23:34:45:66" ]; then
logger -s -p daemon.info -t anyka "The eth0 interface has a lousy MAC, let's try to change it.."
XMMAC="$(ipcinfo --xm_mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t anyka "It is not possible to install a new MAC on the eth0 interface.."
XMMAC="$(ipcinfo --xm-mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t anyka "It is not possible to install a new MAC on the eth0 interface.."
else
logger -s -p daemon.info -t anyka "The eth0 interface has a correct MAC - $(fw_printenv -n ethaddr)"
fi

View File

@ -33,7 +33,7 @@ start() {
logger -s -p daemon.info -t fullhan "Check MAC for Xiongmai devices"
if [ "$(fw_printenv -n ethaddr)" = "00:00:23:34:45:66" ]; then
logger -s -p daemon.info -t fullhan "The eth0 interface has a lousy MAC, let's try to change it.."
XMMAC="$(ipcinfo --xm_mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t fullhan "It is not possible to install a new MAC on the eth0 interface.."
XMMAC="$(ipcinfo --xm-mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t fullhan "It is not possible to install a new MAC on the eth0 interface.."
else
logger -s -p daemon.info -t fullhan "The eth0 interface has a correct MAC - $(fw_printenv -n ethaddr)"
fi

View File

@ -33,7 +33,7 @@ start() {
logger -s -p daemon.info -t fullhan "Check MAC for Xiongmai devices"
if [ "$(fw_printenv -n ethaddr)" = "00:00:23:34:45:66" ]; then
logger -s -p daemon.info -t fullhan "The eth0 interface has a lousy MAC, let's try to change it.."
XMMAC="$(ipcinfo --xm_mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t fullhan "It is not possible to install a new MAC on the eth0 interface.."
XMMAC="$(ipcinfo --xm-mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t fullhan "It is not possible to install a new MAC on the eth0 interface.."
else
logger -s -p daemon.info -t fullhan "The eth0 interface has a correct MAC - $(fw_printenv -n ethaddr)"
fi

View File

@ -33,7 +33,7 @@ start() {
logger -s -p daemon.info -t goke "Check MAC for Xiongmai devices"
if [ "$(fw_printenv -n ethaddr)" = "00:00:23:34:45:66" ]; then
logger -s -p daemon.info -t goke "The eth0 interface has a lousy MAC, let's try to change it.."
XMMAC="$(ipcinfo --xm_mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t goke "It is not possible to install a new MAC on the eth0 interface.."
XMMAC="$(ipcinfo --xm-mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t goke "It is not possible to install a new MAC on the eth0 interface.."
else
logger -s -p daemon.info -t goke "The eth0 interface has a correct MAC - $(fw_printenv -n ethaddr)"
fi

View File

@ -33,7 +33,7 @@ start() {
logger -s -p daemon.info -t grainmedia "Check MAC for GrainMedia devices"
if [ "$(fw_printenv -n ethaddr)" = "00:00:23:34:45:66" ]; then
logger -s -p daemon.info -t grainmedia "The eth0 interface has a lousy MAC, let's try to change it.."
XMMAC="$(ipcinfo --xm_mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t grainmedia "It is not possible to install a new MAC on the eth0 interface.."
XMMAC="$(ipcinfo --xm-mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t grainmedia "It is not possible to install a new MAC on the eth0 interface.."
else
logger -s -p daemon.info -t grainmedia "The eth0 interface has a correct MAC - $(fw_printenv -n ethaddr)"
fi

View File

@ -33,7 +33,7 @@ start() {
logger -s -p daemon.info -t hisilicon "Check MAC for Xiongmai devices"
if [ "$(fw_printenv -n ethaddr)" = "00:00:23:34:45:66" ]; then
logger -s -p daemon.info -t hisilicon "The eth0 interface has a lousy MAC, let's try to change it.."
XMMAC="$(ipcinfo --xm_mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t hisilicon "It is not possible to install a new MAC on the eth0 interface.."
XMMAC="$(ipcinfo --xm-mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t hisilicon "It is not possible to install a new MAC on the eth0 interface.."
else
logger -s -p daemon.info -t hisilicon "The eth0 interface has a correct MAC - $(fw_printenv -n ethaddr)"
fi

View File

@ -33,7 +33,7 @@ start() {
logger -s -p daemon.info -t hisilicon "Check MAC for Xiongmai devices"
if [ "$(fw_printenv -n ethaddr)" = "00:00:23:34:45:66" ]; then
logger -s -p daemon.info -t hisilicon "The eth0 interface has a lousy MAC, let's try to change it.."
XMMAC="$(ipcinfo --xm_mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t hisilicon "It is not possible to install a new MAC on the eth0 interface.."
XMMAC="$(ipcinfo --xm-mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t hisilicon "It is not possible to install a new MAC on the eth0 interface.."
else
logger -s -p daemon.info -t hisilicon "The eth0 interface has a correct MAC - $(fw_printenv -n ethaddr)"
fi

View File

@ -33,7 +33,7 @@ start() {
logger -s -p daemon.info -t hisilicon "Check MAC for Xiongmai devices"
if [ "$(fw_printenv -n ethaddr)" = "00:00:23:34:45:66" ]; then
logger -s -p daemon.info -t hisilicon "The eth0 interface has a lousy MAC, let's try to change it.."
XMMAC="$(ipcinfo --xm_mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t hisilicon "It is not possible to install a new MAC on the eth0 interface.."
XMMAC="$(ipcinfo --xm-mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t hisilicon "It is not possible to install a new MAC on the eth0 interface.."
else
logger -s -p daemon.info -t hisilicon "The eth0 interface has a correct MAC - $(fw_printenv -n ethaddr)"
fi

View File

@ -33,7 +33,7 @@ start() {
logger -s -p daemon.info -t hisilicon "Check MAC for Xiongmai devices"
if [ "$(fw_printenv -n ethaddr)" = "00:00:23:34:45:66" ]; then
logger -s -p daemon.info -t hisilicon "The eth0 interface has a lousy MAC, let's try to change it.."
XMMAC="$(ipcinfo --xm_mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t hisilicon "It is not possible to install a new MAC on the eth0 interface.."
XMMAC="$(ipcinfo --xm-mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t hisilicon "It is not possible to install a new MAC on the eth0 interface.."
else
logger -s -p daemon.info -t hisilicon "The eth0 interface has a correct MAC - $(fw_printenv -n ethaddr)"
fi

View File

@ -33,7 +33,7 @@ start() {
logger -s -p daemon.info -t hisilicon "Check MAC for Xiongmai devices"
if [ "$(fw_printenv -n ethaddr)" = "00:00:23:34:45:66" ]; then
logger -s -p daemon.info -t hisilicon "The eth0 interface has a lousy MAC, let's try to change it.."
XMMAC="$(ipcinfo --xm_mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t hisilicon "It is not possible to install a new MAC on the eth0 interface.."
XMMAC="$(ipcinfo --xm-mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t hisilicon "It is not possible to install a new MAC on the eth0 interface.."
else
logger -s -p daemon.info -t hisilicon "The eth0 interface has a correct MAC - $(fw_printenv -n ethaddr)"
fi

View File

@ -33,7 +33,7 @@ start() {
logger -s -p daemon.info -t hisilicon "Check MAC for Xiongmai devices"
if [ "$(fw_printenv -n ethaddr)" = "00:00:23:34:45:66" ]; then
logger -s -p daemon.info -t hisilicon "The eth0 interface has a lousy MAC, let's try to change it.."
XMMAC="$(ipcinfo --xm_mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t hisilicon "It is not possible to install a new MAC on the eth0 interface.."
XMMAC="$(ipcinfo --xm-mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t hisilicon "It is not possible to install a new MAC on the eth0 interface.."
else
logger -s -p daemon.info -t hisilicon "The eth0 interface has a correct MAC - $(fw_printenv -n ethaddr)"
fi

View File

@ -33,7 +33,7 @@ start() {
logger -s -p daemon.info -t hisilicon "Check MAC for Xiongmai devices"
if [ "$(fw_printenv -n ethaddr)" = "00:00:23:34:45:66" ]; then
logger -s -p daemon.info -t hisilicon "The eth0 interface has a lousy MAC, let's try to change it.."
XMMAC="$(ipcinfo --xm_mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t hisilicon "It is not possible to install a new MAC on the eth0 interface.."
XMMAC="$(ipcinfo --xm-mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t hisilicon "It is not possible to install a new MAC on the eth0 interface.."
else
logger -s -p daemon.info -t hisilicon "The eth0 interface has a correct MAC - $(fw_printenv -n ethaddr)"
fi

View File

@ -33,7 +33,7 @@ start() {
logger -s -p daemon.info -t novatek "Check MAC for Novatek devices"
if [ "$(fw_printenv -n ethaddr)" = "00:00:23:34:45:66" ]; then
logger -s -p daemon.info -t novatek "The eth0 interface has a lousy MAC, let's try to change it.."
XMMAC="$(ipcinfo --xm_mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t novatek "It is not possible to install a new MAC on the eth0 interface.."
XMMAC="$(ipcinfo --xm-mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t novatek "It is not possible to install a new MAC on the eth0 interface.."
else
logger -s -p daemon.info -t novatek "The eth0 interface has a correct MAC - $(fw_printenv -n ethaddr)"
fi

View File

@ -33,7 +33,7 @@ start() {
logger -s -p daemon.info -t rockchip "Check MAC for rockchip devices"
if [ "$(fw_printenv -n ethaddr)" = "00:00:23:34:45:66" ]; then
logger -s -p daemon.info -t rockchip "The eth0 interface has a lousy MAC, let's try to change it.."
XMMAC="$(ipcinfo --xm_mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t rockchip "It is not possible to install a new MAC on the eth0 interface.."
XMMAC="$(ipcinfo --xm-mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t rockchip "It is not possible to install a new MAC on the eth0 interface.."
else
logger -s -p daemon.info -t rockchip "The eth0 interface has a correct MAC - $(fw_printenv -n ethaddr)"
fi

View File

@ -33,7 +33,7 @@ start() {
logger -s -p daemon.info -t xiongmai "Check MAC for Xiongmai devices"
if [ "$(fw_printenv -n ethaddr)" = "00:00:23:34:45:66" ]; then
logger -s -p daemon.info -t xiongmai "The eth0 interface has a lousy MAC, let's try to change it.."
XMMAC="$(ipcinfo --xm_mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t xiongmai "It is not possible to install a new MAC on the eth0 interface.."
XMMAC="$(ipcinfo --xm-mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t xiongmai "It is not possible to install a new MAC on the eth0 interface.."
else
logger -s -p daemon.info -t xiongmai "The eth0 interface has a correct MAC - $(fw_printenv -n ethaddr)"
fi

View File

@ -33,7 +33,7 @@ start() {
logger -s -p daemon.info -t xiongmai "Check MAC for Xiongmai devices"
if [ "$(fw_printenv -n ethaddr)" = "00:00:23:34:45:66" ]; then
logger -s -p daemon.info -t xiongmai "The eth0 interface has a lousy MAC, let's try to change it.."
XMMAC="$(ipcinfo --xm_mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t xiongmai "It is not possible to install a new MAC on the eth0 interface.."
XMMAC="$(ipcinfo --xm-mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t xiongmai "It is not possible to install a new MAC on the eth0 interface.."
else
logger -s -p daemon.info -t xiongmai "The eth0 interface has a correct MAC - $(fw_printenv -n ethaddr)"
fi