info "Kernel-Version im GRM Image: '${GREEN}${kv}${NORMAL}'."
- local spl_version=$( CHROOT apt search spl-dkms 2>/dev/null | grep '^spl-dkms' | awk '{print $2}' )
- local zfs_version=$( CHROOT apt search zfs-dkms 2>/dev/null | grep '^zfs-dkms' | awk '{print $2}' )
+ local spl_version=$( CHROOT apt search spl-dkms 2>/dev/null | grep '^spl-dkms' | awk '{print $2}' | sed -e 's/-[0-9][0-9]*$//' )
+ info "Version von spl-dkms ist: '${GREEN}${spl_version}${NORMAL}'."
+ local zfs_version=$( CHROOT apt search zfs-dkms 2>/dev/null | grep '^zfs-dkms' | awk '{print $2}' | sed -e 's/-[0-9][0-9]*$//' )
+ info "Version von zfs-dkms ist: '${GREEN}${zfs_version}${NORMAL}'."
- CHROOT dkms install -m spl -v "${spl_version}" "${kv}"
- CHROOT dkms install -m zfs -v "${zfs_version}" "${kv}"
+ CHROOT bash -c "cd /usr/src; apt source spl-dkms"
+ CHROOT bash -c "cd /usr/src; apt source zfs-dkms"
+
+ CP -p ${TGT_DIR}/usr/src/spl-linux-${spl_version}/debian/dkms ${TGT_DIR}/usr/src/spl-linux-${spl_version}/dkms.conf
+
+ CHROOT dkms install -m spl-linux -v "${spl_version}" "${kv}"
+ CHROOT dkms install -m zfs-linux -v "${zfs_version}" "${kv}"
# local cmd="apt install --yes"
# if [[ "${debian_version}" == "jessie" ]] ; then