diff --git a/files/initrd/opt/rr/boot.sh b/files/initrd/opt/rr/boot.sh index 8da5c7df..98495a61 100755 --- a/files/initrd/opt/rr/boot.sh +++ b/files/initrd/opt/rr/boot.sh @@ -156,8 +156,6 @@ if [ -z "${MAC1}" ]; then MAC2="" writeConfigKey "mac1" "${MAC1}" "${USER_CONFIG_FILE}" writeConfigKey "mac2" "${MAC2}" "${USER_CONFIG_FILE}" - CMDLINE['mac1']="${MAC1}" - CMDLINE['netif_num']="0" else NETIF_NUM=2 MACS="$(generateMacAddress "${MODEL}" ${NETIF_NUM})" @@ -165,11 +163,10 @@ if [ -z "${MAC1}" ]; then eval MAC${I}="$(echo ${MACS} | cut -d' ' -f${I})" writeConfigKey "mac${I}" "$(echo ${MACS} | cut -d' ' -f${I})" "${USER_CONFIG_FILE}" done - CMDLINE['mac1']="${MAC1}" - CMDLINE['mac2']="${MAC2}" - CMDLINE['netif_num']="${NETIF_NUM}" fi fi +[ -n "${MAC1}" ] && CMDLINE['mac1']="${MAC1}" && CMDLINE['netif_num']="1" +[ -n "${MAC2}" ] && CMDLINE['mac2']="${MAC2}" && CMDLINE['netif_num']="2" CMDLINE['skip_vender_mac_interfaces']="$(seq -s, 0 $((${CMDLINE['netif_num']:-1} - 1)))"