--- lustre-2.12.7/lustre-dkms_pre-build.sh 2021-07-14 22:06:05.000000000 -0700 +++ lustre-2.12.7-dkms-pcds/lustre-dkms_pre-build.sh 2021-09-26 08:30:54.096000000 -0700 @@ -20,18 +20,16 @@ fi # ZFS and SPL are version locked - ZFS_VERSION=$(dkms status -m zfs -k $3 -a $5 | awk -F', ' '{print $2; exit 0}' | grep -v ': added$') + ZFS_VERSION=$(dkms status -m zfs | awk ' { print $1 } ' | sed -e 's/zfs\///' -e 's/,//' | sort -V | tail -n1) + if [ -z $ZFS_VERSION ] ; then echo "zfs-dkms package must already be installed and built under DKMS control" exit 1 fi SERVER="--enable-server $LDISKFS \ - --with-linux=$4 --with-linux-obj=$4 \ - --with-spl=$6/spl-${ZFS_VERSION} \ - --with-spl-obj=$7/spl/${ZFS_VERSION}/$3/$5 \ - --with-zfs=$6/zfs-${ZFS_VERSION} \ - --with-zfs-obj=$7/zfs/${ZFS_VERSION}/$3/$5" + --with-zfs=/usr/src/zfs-${ZFS_VERSION} \ + --with-zfs-obj=/var/lib/dkms/zfs/${ZFS_VERSION}/$3/$5" KERNEL_STUFF="--with-linux=$4 --with-linux-obj=$4" ;;