Only run pre-mount hook zfs-load-key on systemd

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
This commit is contained in:
Matthew Thode 2018-02-08 02:31:54 +00:00 committed by Brian Behlendorf
parent 9ca25e709b
commit 6f259b59cf
1 changed files with 3 additions and 0 deletions

View File

@ -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