bundles/zfs: fix dependencies, auto-load zfs module if not loaded

This commit is contained in:
Franzi 2020-10-31 10:11:15 +01:00
parent 8eeaabf615
commit 76fe68a3d1
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 23 additions and 17 deletions

View file

@ -3,7 +3,24 @@ from os.path import join
from bundlewrap.metadata import MetadataJSONEncoder
actions = {}
actions = {
# For some reason, this module doesn't get auto-loaded on debian,
# even if installation of zfsutils-linux tries to start
# zfs-mount.service. We have no choice but to do it manually.
'modprobe_zfs': {
'command': 'modprobe zfs',
'unless': 'lsmod | grep ^zfs',
'needs': {
'pkg_apt:zfs-dkms',
},
'needed_by': {
'pkg_apt:zfs-zed',
'pkg_apt:zfsutils-linux',
'zfs_dataset:',
'zfs_pool:',
},
},
}
files = {
'/etc/modprobe.d/zfs.conf': {