]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Only run pre-mount hook zfs-load-key on systemd
authorMatthew Thode <mthode@mthode.org>
Thu, 8 Feb 2018 02:31:54 +0000 (02:31 +0000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 8 Feb 2018 02:31:54 +0000 (18:31 -0800)
Reviewed-by: Kash Pande <kash@tripleback.net>
Reviewed-by: bunder2015 <omfgbunder@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matthew Thode <mthode@mthode.org>
Closes #7136
Closes #7140

contrib/dracut/90zfs/zfs-load-key.sh.in

index d86763fcc91e55387390118c0a404bb567453624..9a6241bd763477c24089776d1e2815331a2b18b1 100755 (executable)
@@ -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