arc/boot: fix network list, enable mmc boot

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-01-31 16:28:21 +01:00
parent 2593b2dad5
commit e76549997d
4 changed files with 6 additions and 6 deletions

View File

@ -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}")"

View 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}")"

View 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

View File

@ -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