From 6f259b59cf16f3c859caa64ce5fe55aa39481bad Mon Sep 17 00:00:00 2001 From: Matthew Thode Date: Thu, 8 Feb 2018 02:31:54 +0000 Subject: [PATCH] Only run pre-mount hook zfs-load-key on systemd Reviewed-by: Kash Pande Reviewed-by: bunder2015 Reviewed-by: Brian Behlendorf Signed-off-by: Matthew Thode Closes #7136 Closes #7140 --- contrib/dracut/90zfs/zfs-load-key.sh.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/dracut/90zfs/zfs-load-key.sh.in b/contrib/dracut/90zfs/zfs-load-key.sh.in index d86763fcc..9a6241bd7 100755 --- a/contrib/dracut/90zfs/zfs-load-key.sh.in +++ b/contrib/dracut/90zfs/zfs-load-key.sh.in @@ -1,5 +1,8 @@ #!/bin/bash +# only run this on systemd systems, we handle the decrypt in mount-zfs.sh in the mount hook otherwise +[[ -e /bin/systemctl ]] || return 0 + # This script only gets executed on systemd systems, see mount-zfs.sh for non-systemd systems # import the libs now that we know the pool imported -- 2.40.0