From 39f119c1235451abc0b3b7686e83ab87eee2e9c8 Mon Sep 17 00:00:00 2001 From: AuxXxilium Date: Fri, 1 Nov 2024 11:44:57 +0100 Subject: [PATCH] arc: cleanup Signed-off-by: AuxXxilium --- files/initrd/opt/arc/arc.sh | 9 +-------- files/initrd/opt/arc/boot.sh | 1 + files/initrd/opt/arc/init.sh | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/files/initrd/opt/arc/arc.sh b/files/initrd/opt/arc/arc.sh index c2f0762d..1f66a668 100755 --- a/files/initrd/opt/arc/arc.sh +++ b/files/initrd/opt/arc/arc.sh @@ -724,16 +724,9 @@ function make() { # Check for Arc Patch ARCCONF="$(readConfigKey "${MODEL}.serial" "${S_FILE}")" ARCPATCH="$(readConfigKey "arc.patch" "${USER_CONFIG_FILE}")" - if [ -n "${ARCCONF}" ] && [ "${ARCPATCH}" == "true" ]; then - if readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q "sspatch"; then - writeConfigKey "addons.sspatch" "true" "${USER_CONFIG_FILE}" - fi - elif [ -z "${ARCCONF}" ] || [ "${ARCPATCH}" == "false" ]; then + if [ -z "${ARCCONF}" ] || [ "${ARCPATCH}" == "false" ]; then deleteConfigKey "addons.amepatch" "${USER_CONFIG_FILE}" deleteConfigKey "addons.arcdns" "${USER_CONFIG_FILE}" - if readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q "sspatch"; then - writeConfigKey "addons.sspatch" "false" "${USER_CONFIG_FILE}" - fi fi # Max Memory for DSM RAMCONFIG="$((${RAMTOTAL} * 1024 * 2))" diff --git a/files/initrd/opt/arc/boot.sh b/files/initrd/opt/arc/boot.sh index 1e8660c8..33c6aaf1 100755 --- a/files/initrd/opt/arc/boot.sh +++ b/files/initrd/opt/arc/boot.sh @@ -243,6 +243,7 @@ elif [ "${DIRECTBOOT}" == "false" ]; then echo -e "\033[1;37mDetected ${ETHN} NIC:\033[0m" fi echo + [ ! -f /var/run/dhcpcd/pid ] && /etc/init.d/S41dhcpcd restart >/dev/null 2>&1 || true sleep 3 for ETH in ${ETHX}; do COUNT=0 diff --git a/files/initrd/opt/arc/init.sh b/files/initrd/opt/arc/init.sh index 4e0a7408..f29e69a2 100755 --- a/files/initrd/opt/arc/init.sh +++ b/files/initrd/opt/arc/init.sh @@ -123,7 +123,6 @@ writeConfigKey "device.nic" "${ETHN}" "${USER_CONFIG_FILE}" # No network devices echo [ ${ETHN} -le 0 ] && die "No NIC found! - Loader does not work without Network connection." -[ ! -f /var/run/dhcpcd/pid ] && /etc/init.d/S41dhcpcd restart >/dev/null 2>&1 || true # Get the VID/PID if we are in USB VID="0x46f4" @@ -172,6 +171,7 @@ BOOTIPWAIT="$(readConfigKey "bootipwait" "${USER_CONFIG_FILE}")" echo -e "\033[1;37mDetected ${ETHN} NIC:\033[0m" IPCON="" echo +[ ! -f /var/run/dhcpcd/pid ] && /etc/init.d/S41dhcpcd restart >/dev/null 2>&1 || true sleep 3 for ETH in ${ETHX}; do COUNT=0