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
}
{
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"