Skip to content

Commit

Permalink
Use zfs-import.target in contrib/dracut
Browse files Browse the repository at this point in the history
The new zfs-import.target should be used in place of the
zfs-import-*.service units.

Signed-off-by: Antonio Russo <[email protected]>
  • Loading branch information
aerusso committed Dec 14, 2017
1 parent f6940bb commit ffd13e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 6 additions & 4 deletions contrib/dracut/90zfs/module-setup.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,12 @@ install() {
mkdir -p "${initdir}/$systemdsystemunitdir/initrd.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
type mark_hostonly >/dev/null 2>&1 && mark_hostonly @systemdunitdir@/zfs-import-$_item.service
fi
type mark_hostonly >/dev/null 2>&1 && mark_hostonly @systemdunitdir@/zfs-import-$_item.service
done
dracut_install @systemdunitdir@/zfs-import.target
type mark_hostonly >/dev/null 2>&1 && mark_hostonly @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
fi
fi
}
3 changes: 1 addition & 2 deletions contrib/dracut/90zfs/zfs-generator.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,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]"
echo "What=${root}"
echo "Type=${rootfstype}"
Expand Down

0 comments on commit ffd13e2

Please sign in to comment.