mirror of
https://github.com/AuxXxilium/arc-c.git
synced 2024-11-23 23:11:08 +07:00
arc/boot: fix network list, enable mmc boot
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
2593b2dad5
commit
e76549997d
@ -1971,7 +1971,7 @@ function sysinfo() {
|
||||
[ -d /sys/firmware/efi ] && BOOTSYS="UEFI" || BOOTSYS="Legacy"
|
||||
VENDOR="$(dmidecode -s system-product-name)"
|
||||
BOARD="$(dmidecode -s baseboard-product-name)"
|
||||
ETHX=$(ls /sys/class/net/ | grep -v lo || true)
|
||||
ETHX=$(ls /sys/class/net/ | grep -v lo) || true
|
||||
ETH="$(readConfigKey "device.nic" "${USER_CONFIG_FILE}")"
|
||||
CONFDONE="$(readConfigKey "arc.confdone" "${USER_CONFIG_FILE}")"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
|
@ -179,7 +179,7 @@ elif [[ "${DIRECTBOOT}" = "true" && ${BOOTCOUNT} -eq 0 ]]; then
|
||||
echo -e " \033[1;34mDSM not installed - Reboot with Directboot\033[0m"
|
||||
exec reboot
|
||||
elif [ "${DIRECTBOOT}" = "false" ]; then
|
||||
ETHX=$(ls /sys/class/net/ | grep -v lo || true)
|
||||
ETHX=$(ls /sys/class/net/ | grep -v lo) || true
|
||||
ETH=$(echo ${ETHX} | wc -w)
|
||||
STATICIP="$(readConfigKey "arc.staticip" "${USER_CONFIG_FILE}")"
|
||||
BOOTIPWAIT="$(readConfigKey "arc.bootipwait" "${USER_CONFIG_FILE}")"
|
||||
|
@ -66,7 +66,7 @@ function getnet() {
|
||||
}
|
||||
|
||||
# Get Amount of NIC
|
||||
ETHX=$(ls /sys/class/net/ | grep -v lo || true)
|
||||
ETHX=$(ls /sys/class/net/ | grep -v lo) || true
|
||||
ETH=$(echo ${ETHX} | wc -w)
|
||||
writeConfigKey "device.nic" "${ETH}" "${USER_CONFIG_FILE}"
|
||||
# Get actual IP
|
||||
|
@ -61,7 +61,7 @@ initConfigKey "arc.version" "${ARC_VERSION}" "${USER_CONFIG_FILE}"
|
||||
initConfigKey "device" "{}" "${USER_CONFIG_FILE}"
|
||||
|
||||
# Init Network
|
||||
ETHX=$(ls /sys/class/net/ | grep -v lo || true)
|
||||
ETHX=$(ls /sys/class/net/ | grep -v lo) || true
|
||||
ETH=$(echo ${ETHX} | wc -w)
|
||||
# No network devices
|
||||
[ ${ETH} -le 0 ] && die "No NIC found! - Loader does not work without Network connection."
|
||||
@ -90,8 +90,8 @@ BUS=$(getBus "${LOADER_DISK}")
|
||||
if [ "${BUS}" = "usb" ]; then
|
||||
VID="0x$(udevadm info --query property --name "${LOADER_DISK}" | grep ID_VENDOR_ID | cut -d= -f2)"
|
||||
PID="0x$(udevadm info --query property --name "${LOADER_DISK}" | grep ID_MODEL_ID | cut -d= -f2)"
|
||||
elif [[ "${BUS}" != "sata" && "${BUS}" != "scsi" && "${BUS}" != "nvme" ]]; then
|
||||
die "Loader disk is not USB or SATA/SCSI/NVME DoM"
|
||||
elif [[ "${BUS}" != "sata" && "${BUS}" != "scsi" && "${BUS}" != "nvme" && "${BUS}" != "mmc" ]]; then
|
||||
die "Loader disk is not USB or SATA/SCSI/NVME/eMMC DoM"
|
||||
fi
|
||||
|
||||
# Save variables to user config file
|
||||
|
Loading…
Reference in New Issue
Block a user