ramdisk: try something new

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-01-17 17:11:36 +01:00
parent eaa206b176
commit d468b2f9bf

View File

@ -39,6 +39,7 @@ HDDSORT="$(readConfigKey "arc.hddsort" "${USER_CONFIG_FILE}")"
PRODUCTVERDSM="${majorversion}.${minorversion}"
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
KVER="$(readModelKey "${MODEL}" "productvers.[${PRODUCTVER}].kver")"
KVERM="$(readModelKey "${MODEL}" "productvers.[${PRODUCTVER}].kver")+"
RD_COMPRESSED="$(readModelKey "${MODEL}" "productvers.[${PRODUCTVER}].rd-compressed")"
# Read new PAT Info from Config
PAT_URL="$(readConfigKey "arc.paturl" "${USER_CONFIG_FILE}")"
@ -123,9 +124,9 @@ for F in $(ls "${TMP_PATH}/modules/"*.ko 2>/dev/null); do
M=$(basename ${F})
[[ "${ODP}" = "true" && -f "${RAMDISK_PATH}/usr/lib/modules/${M}" ]] && continue
if arrayExistItem "${M:0:-3}" "${!USERMODULES[@]}"; then
cp -f "${F}" "${RAMDISK_PATH}/usr/lib/modules/${M}"
cp -f "${F}" "${RAMDISK_PATH}/usr/lib/modules/${KVERM}/${M}"
else
rm -f "${RAMDISK_PATH}/usr/lib/modules/${M}"
rm -f "${RAMDISK_PATH}/usr/lib/modules/${KVERM}/${M}"
fi
done
mkdir -p "${RAMDISK_PATH}/usr/lib/firmware"