aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/dracut/90zfs/module-setup.sh.in
diff options
context:
space:
mode:
authorMichael Niewöhner <[email protected]>2019-04-03 02:14:39 +0200
committerBrian Behlendorf <[email protected]>2019-04-02 17:14:39 -0700
commitce4432c5424eb9aa4d00833ee7529cf24491bdde (patch)
tree90a31dd531a2d3f12d868816bd9e9fc05bae5726 /contrib/dracut/90zfs/module-setup.sh.in
parentf72ecb8d2779ef8b3e8892280c8c8756a419e461 (diff)
Move dracut specifics to dracut module
Dracut depends on the environment variable BOOTFS to be set after pool import. This dracut specific systemd ExecStartPost command should not be called for any non-dracut systems, so let's move it to a static systemd unit that. Reviewed-by: Manuel Amador (Rudd-O) <[email protected]> Reviewed-by: Matthew Thode <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Michael Niewöhner <[email protected]> Closes #8510
Diffstat (limited to 'contrib/dracut/90zfs/module-setup.sh.in')
-rwxr-xr-xcontrib/dracut/90zfs/module-setup.sh.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/dracut/90zfs/module-setup.sh.in b/contrib/dracut/90zfs/module-setup.sh.in
index f595a369c..4efc4b018 100755
--- a/contrib/dracut/90zfs/module-setup.sh.in
+++ b/contrib/dracut/90zfs/module-setup.sh.in
@@ -98,6 +98,9 @@ install() {
type mark_hostonly >/dev/null 2>&1 && mark_hostonly @systemdunitdir@/zfs-import-$_item.service
fi
done
+ inst "${moddir}"/zfs-env-bootfs.service "${systemdsystemunitdir}"/zfs-env-bootfs.service
+ ln -s ../zfs-env-bootfs.service "${initdir}/${systemdsystemunitdir}/zfs-import.target.wants"/zfs-env-bootfs.service
+ type mark_hostonly >/dev/null 2>&1 && mark_hostonly @systemdunitdir@/zfs-env-bootfs.service
dracut_install systemd-ask-password
dracut_install systemd-tty-ask-password-agent
mkdir -p "${initdir}/$systemdsystemunitdir/initrd.target.wants"