mirror of
https://github.com/AuxXxilium/arc-c.git
synced 2024-11-23 15:01:07 +07:00
init/boot: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
2ad5785748
commit
27de602d31
@ -143,29 +143,29 @@ if [ "$(readModelKey "${MODEL}" "dt")" = "true" ] && ! echo "epyc7002 purley bro
|
||||
CMDLINE['modprobe.blacklist']+="mpt3sas"
|
||||
fi
|
||||
|
||||
N=0
|
||||
NIC=0
|
||||
if [ "${MACSYS}" = "arc" ]; then
|
||||
MAC="$(readConfigKey "mac.eth0" "${USER_CONFIG_FILE}")"
|
||||
[ -n "${MAC}" ] && CMDLINE["mac1"]="${MAC}"
|
||||
for ETH in ${ETHX}; do
|
||||
N=$((${N} + 1))
|
||||
NIC=$((${NIC} + 1))
|
||||
done
|
||||
CMDLINE['netif_num']="1"
|
||||
CMDLINE['skip_vender_mac_interfaces']="0,1,2,3,4,5,6,7"
|
||||
elif [ "${MACSYS}" = "hardware" ]; then
|
||||
for ETH in ${ETHX}; do
|
||||
MAC="$(readConfigKey "mac.${ETH}" "${USER_CONFIG_FILE}")"
|
||||
[ -n "${MAC}" ] && N=$((${N} + 1)) && CMDLINE["mac${N}"]="${MAC}"
|
||||
[ -n "${MAC}" ] && NIC=$((${NIC} + 1)) && CMDLINE["mac${NIC}"]="${MAC}"
|
||||
done
|
||||
CMDLINE['netif_num']="${N}"
|
||||
CMDLINE['skip_vender_mac_interfaces']="0,1,2,3,4,5,6,7"
|
||||
elif [ "${MACSYS}" = "custom" ]; then
|
||||
for ETH in ${ETHX}; do
|
||||
MAC="$(readConfigKey "mac.${ETH}" "${USER_CONFIG_FILE}")"
|
||||
[ -n "${MAC}" ] && N=$((${N} + 1)) && CMDLINE["mac${N}"]="${MAC}"
|
||||
[ -n "${MAC}" ] && NIC=$((${NIC} + 1)) && CMDLINE["mac${NIC}"]="${MAC}"
|
||||
done
|
||||
CMDLINE['netif_num']="${N}"
|
||||
CMDLINE['skip_vender_mac_interfaces']="$(seq -s, ${N} 7)"
|
||||
CMDLINE['netif_num']="${NIC}"
|
||||
CMDLINE['skip_vender_mac_interfaces']="$(seq -s, ${NIC} 7)"
|
||||
fi
|
||||
|
||||
# Read cmdline
|
||||
@ -194,7 +194,7 @@ if [ "${DIRECTBOOT}" = "true" ]; then
|
||||
exec reboot
|
||||
elif [ "${DIRECTBOOT}" = "false" ]; then
|
||||
BOOTIPWAIT="$(readConfigKey "arc.bootipwait" "${USER_CONFIG_FILE}")"
|
||||
echo -e " \033[1;34mDetected ${N} NIC.\033[0m \033[1;37mWaiting for Connection:\033[0m"
|
||||
echo -e " \033[1;34mDetected ${NIC} NIC.\033[0m \033[1;37mWaiting for Connection:\033[0m"
|
||||
for ETH in ${ETHX}; do
|
||||
IP=""
|
||||
DRIVER=$(ls -ld /sys/class/net/${ETH}/device/driver 2>/dev/null | awk -F '/' '{print $NF}')
|
||||
|
@ -145,7 +145,7 @@ echo
|
||||
|
||||
BOOTIPWAIT="$(readConfigKey "arc.bootipwait" "${USER_CONFIG_FILE}")"
|
||||
[ -z "${BOOTIPWAIT}" ] && BOOTIPWAIT=20
|
||||
echo -e "\033[1;34mDetected ${N} NIC.\033[0m \033[1;37mWaiting for Connection:\033[0m"
|
||||
echo -e "\033[1;34mDetected ${NIC} NIC.\033[0m \033[1;37mWaiting for Connection:\033[0m"
|
||||
for ETH in ${ETHX}; do
|
||||
IP=""
|
||||
STATICIP="$(readConfigKey "static.${ETH}" "${USER_CONFIG_FILE}")"
|
||||
|
Loading…
Reference in New Issue
Block a user