diff options
author | Rudd-O <[email protected]> | 2016-10-17 18:51:15 +0000 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-10-17 11:51:15 -0700 |
commit | f8e87e205c745c1e360230ac9c7631eb4632acfa (patch) | |
tree | 57dc7fb26c0d7a1ce2f5fd6d97a2c674c69c6966 /contrib/dracut/90zfs/module-setup.sh.in | |
parent | fea33e4e5010e209a4d05fa3f59b7155859e1593 (diff) |
Properly use the Dracut cleanup hook to order pool shutdown
When Dracut starts up, it needs to determine whether a pool will remain
"hanging open" before the system shuts off. In such a case, then the
code to clean up the pool (using the previous export -F work) must
be invoked. Since Dracut has had a recent change that makes
mount-zfs.sh simply not run when the root dataset is already mounted,
we must use the cleanup hook to order Dracut to do shutdown cleanup.
Important note: this code will not accomplish its stated goal until this
bug is fixed: https://bugzilla.redhat.com/show_bug.cgi?id=1385432
That bug impacts more than just ZFS. It impacts LUKS, dmraid, and
unmount during poweroff. It is a Fedora-wide bug.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Manuel Amador (Rudd-O) <[email protected]>
Closes #5287
Diffstat (limited to 'contrib/dracut/90zfs/module-setup.sh.in')
-rwxr-xr-x | contrib/dracut/90zfs/module-setup.sh.in | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/dracut/90zfs/module-setup.sh.in b/contrib/dracut/90zfs/module-setup.sh.in index 240847a77..a653b50f4 100755 --- a/contrib/dracut/90zfs/module-setup.sh.in +++ b/contrib/dracut/90zfs/module-setup.sh.in @@ -58,6 +58,7 @@ install() { inst_script "${moddir}/zfs-generator.sh" "$systemdutildir"/system-generators/dracut-zfs-generator fi inst_hook mount 98 "${moddir}/mount-zfs.sh" + inst_hook cleanup 99 "${moddir}/zfs-needshutdown.sh" inst_hook shutdown 20 "${moddir}/export-zfs.sh" inst_simple "${moddir}/zfs-lib.sh" "/lib/dracut-zfs-lib.sh" |