mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
修复 MACS 设置错误
This commit is contained in:
parent
ac99d1ea51
commit
eb7a015003
@ -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)))"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user