Skip to content

Commit

Permalink
Added building kernel modules if not present
Browse files Browse the repository at this point in the history
  • Loading branch information
t0fik committed Aug 25, 2018
1 parent 7935bdc commit 288c3e1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/zmogrify
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ kver=$1

[[ -z "${kver}" ]] && kver=$(uname -r)

if dkms status --kernelver ${kver} | grep -q spl 2>/dev/null; then
splver=$(ls -d /usr/src/spl*| xargs -I{} basename {}|sort -V|tail -n1|cut -d'-' -f2)
dkms install -m spl/$splver
fi

if dkms status --kernelver ${kver} | grep -q zfs 2>/dev/null; then
zfsver=$(ls -d /usr/src/zfs*| xargs -I{} basename {}|sort -V|tail -n1|cut -d'-' -f2)
dkms install -m spl/$zfsver
fi



/usr/bin/dracut -fv --kver $kver
md5sum /boot/initramfs-${kver}.img > /boot/initramfs-${kver}.md5sum

Expand Down
5 changes: 4 additions & 1 deletion zfs-rootfs.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: zfs-rootfs
Version: 1.3.1
Version: 1.3.2
Release: 1%{?dist}
Summary: Utils and configs for Linux on ZFS

Expand Down Expand Up @@ -40,6 +40,9 @@ done
%{_unitdir}/*/*.conf

%changelog
* Sat Aug 25 2018 Jerzy Drozdz <[email protected]> - 1.3.2-1
- Added checking if zfs modules are present in kernel

* Wed Aug 15 2018 Jerzy Drozdz <[email protected]> - 1.3.1-1
- Fixed checksum output file name

Expand Down

0 comments on commit 288c3e1

Please sign in to comment.