Skip to content
This repository was archived by the owner on Aug 25, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions dracut/30ignition/ignition-generator
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ Requires=dev-disk-by\x2dlabel-boot.device
After=dev-disk-by\x2dlabel-boot.device
EOF
fi
else
# If we're doing a non-Ignition (subsequent) boot, then
# queue a different target. This is necessary so that units
# like `ignition-ostree-mount-sysroot.service`
# can cleanly distinguish between the two.
add_requires ignition-subsequent.target initrd.target
fi

echo "PLATFORM_ID=$(cmdline_arg ignition.platform.id)" > /run/ignition.env
14 changes: 14 additions & 0 deletions dracut/30ignition/ignition-subsequent.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This target is queued to run when Ignition will *not* run.
# It's intended right now for mounting sysroot, which happens in a quite
# different order on the Ignition boot versus "subsequent" boots.
[Unit]
Description=Subsequent (Not Ignition) boot complete
Before=initrd.target

# See comments in ignition-complete.target
OnFailure=emergency.target
OnFailureJobMode=isolate

# Make sure we stop all the units before switching root
Conflicts=initrd-switch-root.target umount.target
Conflicts=dracut-emergency.service emergency.service emergency.target
2 changes: 2 additions & 0 deletions dracut/30ignition/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ install() {

inst_simple "$moddir/ignition-complete.target" \
"$systemdsystemunitdir/ignition-complete.target"
inst_simple "$moddir/ignition-subsequent.target" \
"$systemdsystemunitdir/ignition-subsequent.target"

inst_simple "$moddir/ignition-diskful.target" \
"$systemdsystemunitdir/ignition-diskful.target"
Expand Down