diff options
Diffstat (limited to 'contrib/dracut')
-rwxr-xr-x | contrib/dracut/90zfs/module-setup.sh.in | 12 | ||||
-rwxr-xr-x | contrib/dracut/90zfs/zfs-generator.sh.in | 3 |
2 files changed, 10 insertions, 5 deletions
diff --git a/contrib/dracut/90zfs/module-setup.sh.in b/contrib/dracut/90zfs/module-setup.sh.in index 19b763a3c..38dd84d5a 100755 --- a/contrib/dracut/90zfs/module-setup.sh.in +++ b/contrib/dracut/90zfs/module-setup.sh.in @@ -89,15 +89,21 @@ install() { printf "\x${DD}\x${CC}\x${BB}\x${AA}" > "${initdir}/etc/hostid" if dracut_module_included "systemd"; then - mkdir -p "${initdir}/$systemdsystemunitdir/initrd.target.wants" + mkdir -p "${initdir}/$systemdsystemunitdir/zfs-import.target.wants" for _item in scan cache ; do dracut_install @systemdunitdir@/zfs-import-$_item.service - if ! [ -L "${initdir}/$systemdsystemunitdir/initrd.target.wants"/zfs-import-$_item.service ]; then - ln -s ../zfs-import-$_item.service "${initdir}/$systemdsystemunitdir/initrd.target.wants"/zfs-import-$_item.service + if ! [ -L "${initdir}/$systemdsystemunitdir/zfs-import.target.wants"/zfs-import-$_item.service ]; then + ln -s ../zfs-import-$_item.service "${initdir}/$systemdsystemunitdir/zfs-import.target.wants"/zfs-import-$_item.service type mark_hostonly >/dev/null 2>&1 && mark_hostonly @systemdunitdir@/zfs-import-$_item.service fi done dracut_install systemd-ask-password dracut_install systemd-tty-ask-password-agent + mkdir -p "${initdir}/$systemdsystemunitdir/initrd.target.wants" + dracut_install @systemdunitdir@/zfs-import.target + if ! [ -L "${initdir}/$systemdsystemunitdir/initrd.target.wants"/zfs-import.target ]; then + ln -s ../zfs-import.target "${initdir}/$systemdsystemunitdir/initrd.target.wants"/zfs-import.target + type mark_hostonly >/dev/null 2>&1 && mark_hostonly @systemdunitdir@/zfs-import.target + fi fi } diff --git a/contrib/dracut/90zfs/zfs-generator.sh.in b/contrib/dracut/90zfs/zfs-generator.sh.in index 4446ed52e..0b8a8aaca 100755 --- a/contrib/dracut/90zfs/zfs-generator.sh.in +++ b/contrib/dracut/90zfs/zfs-generator.sh.in @@ -41,8 +41,7 @@ echo "zfs-generator: writing extension for sysroot.mount to $GENERATOR_DIR"/sysr { echo "[Unit]" echo "Before=initrd-root-fs.target" - echo "After=zfs-import-scan.service" - echo "After=zfs-import-cache.service" + echo "After=zfs-import.target" echo "[Mount]" if [ "${root}" = "zfs:AUTO" ] ; then echo "PassEnvironment=BOOTFS" |