From ff93cbb1f6f487b1c7d7484c616184aeb7554ac3 Mon Sep 17 00:00:00 2001 From: Damian Szuberski Date: Thu, 24 Feb 2022 19:33:48 +0100 Subject: [PATCH] Fix directory detection in `dkms.mkconf` Fix `zfs-dkms` installation on Debian-derived distributions by aligning the directory detection logic to #13096. Reviewed-by: Brian Behlendorf Signed-off-by: szubersk Closes #11449 Closes #13141 --- scripts/dkms.mkconf | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/scripts/dkms.mkconf b/scripts/dkms.mkconf index ebe38e31916a..4090efa087f7 100755 --- a/scripts/dkms.mkconf +++ b/scripts/dkms.mkconf @@ -29,22 +29,14 @@ PRE_BUILD="configure --prefix=/usr --with-config=kernel --with-linux=\$( - case \`lsb_release -is\` in - (Debian|Devuan) - if [[ -e \${kernel_source_dir/%build/source} ]] - then - echo \${kernel_source_dir/%build/source} - else - # A kpkg exception for Proxmox 2.0 - echo \${kernel_source_dir} - fi - ;; - (*) - echo \${kernel_source_dir} - ;; - esac + if [ -e "\${kernel_source_dir/%build/source}" ] + then + echo "\${kernel_source_dir/%build/source}" + else + echo "\${kernel_source_dir}" + fi ) - --with-linux-obj=\${kernel_source_dir} + --with-linux-obj="\${kernel_source_dir}" \$( [[ -n \"\${ICP_ROOT}\" ]] && \\ {