init: cleanup

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-02-24 23:15:09 +01:00
parent 00b61a82b1
commit 8258423996

View File

@ -71,7 +71,7 @@ for ETH in ${ETHX}; do
initConfigKey "mac.${ETH}" "${MACR}" "${USER_CONFIG_FILE}"
if [ "${MACSYS}" = "custom" ]; then
MACA="$(readConfigKey "mac.${ETH}" "${USER_CONFIG_FILE}")"
if [[ -n "${MACA}" && "${MACA}" != "${MACR}" ]]; then
if [ ! "${MACA}" = "${MACR}" ]; then
MAC="${MACA:0:2}:${MACA:2:2}:${MACA:4:2}:${MACA:6:2}:${MACA:8:2}:${MACA:10:2}"
echo "Setting ${ETH} MAC to ${MAC}"
ip link set dev ${ETH} address "${MAC}" >/dev/null 2>&1 &&