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 <behlendorf1@llnl.gov>
Signed-off-by: szubersk <szuberskidamian@gmail.com>
Closes #11449
Closes #13141
This commit is contained in:
Damian Szuberski 2022-02-24 19:33:48 +01:00 committed by Tony Hutter
parent 1d70698174
commit 5c80a25653
1 changed files with 7 additions and 15 deletions

View File

@ -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} ]]
if [ -e "\${kernel_source_dir/%build/source}" ]
then
echo \${kernel_source_dir/%build/source}
echo "\${kernel_source_dir/%build/source}"
else
# A kpkg exception for Proxmox 2.0
echo \${kernel_source_dir}
echo "\${kernel_source_dir}"
fi
;;
(*)
echo \${kernel_source_dir}
;;
esac
)
--with-linux-obj=\${kernel_source_dir}
--with-linux-obj="\${kernel_source_dir}"
\$(
[[ -n \"\${ICP_ROOT}\" ]] && \\
{