diff --git a/tools/json/config.system.json b/tools/json/config.system.json index 134288903..6be7d4535 100644 --- a/tools/json/config.system.json +++ b/tools/json/config.system.json @@ -94,7 +94,7 @@ ], "status": "Stable", "author": "@armbian", - "condition": "! module_zfs status && linux-version compare ${KERNELID} le $(module_zfs kernel_max)" + "condition": "! module_zfs status && linux-version compare \"${KERNELID}\" le \"$(module_zfs kernel_max)\"" }, { "id": "SY221", diff --git a/tools/modules/functions/set_runtime_variables.sh b/tools/modules/functions/set_runtime_variables.sh index 87ca3d26e..96dcab053 100644 --- a/tools/modules/functions/set_runtime_variables.sh +++ b/tools/modules/functions/set_runtime_variables.sh @@ -66,8 +66,13 @@ function set_runtime_variables() { [[ -z "${DEFAULT_ADAPTER// /}" ]] && DEFAULT_ADAPTER="lo" # zfs subsystem - determine if our kernel is not too recent ZFS_DKMS_VERSION=$(LC_ALL=C apt-cache policy zfs-dkms | grep Candidate | xargs | cut -d" " -f2 | cut -c-5) - ZFS_KERNEL_MAX=$(wget -qO- https://github.com/openzfs/zfs/raw/refs/tags/zfs-${ZFS_DKMS_VERSION}/META | grep Maximum | cut -d" " -f2) - + ZFS_KERNEL_MAX=$(wget -qO- https://raw.githubusercontent.com/openzfs/zfs/refs/tags/zfs-${ZFS_DKMS_VERSION}/META | grep Maximum | cut -d" " -f2) + # sometimes Ubuntu sets higher version then existing tag. Lets probe previous version + if [[ -z "${ZFS_KERNEL_MAX}" ]]; then + local previous_version="$(printf "%03d" "$(expr "$(echo $ZFS_DKMS_VERSION | sed 's/\.//g')" - 1)")" + local previous_version=$(echo "${previous_version:0:1}.${previous_version:1:1}.${previous_version:2:1}") + ZFS_KERNEL_MAX=$(wget -qO- https://raw.githubusercontent.com/openzfs/zfs/refs/tags/zfs-${previous_version}/META | grep Maximum | cut -d" " -f2) + fi # detect desktop check_desktop diff --git a/tools/modules/system/module_armbian_firmware.sh b/tools/modules/system/module_armbian_firmware.sh index dc99fb306..a1ef3c6fe 100644 --- a/tools/modules/system/module_armbian_firmware.sh +++ b/tools/modules/system/module_armbian_firmware.sh @@ -17,6 +17,9 @@ function module_armbian_firmware() { case "$1" in "${commands[0]}") # choose kernel from the list + # We are updating beta packages repository quite often. In order to make sure, update won't break, always update package list + apt_install_wrapper apt-get update + # make sure to proceed if this variable is not defined. This can surface on some old builds [[ -z "${KERNEL_TEST_TARGET}" ]] && KERNEL_TEST_TARGET="legacy,vendor,current,edge"