-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ignition-ostree: Split unit for sysroot mounting
The unit to mount sysroot only worked the *first* boot because it was integrated with Ignition. We need to have separate units with different dependencies (but that execute the same code) for the "Ignition boot" compared with "subsequent" boots. Depends coreos/ignition-dracut#131
- Loading branch information
Showing
3 changed files
with
39 additions
and
14 deletions.
There are no files selected for viewing
7 changes: 5 additions & 2 deletions
7
...ree/ignition-ostree-mount-sysroot.service → ...on-ostree-mount-firstboot-sysroot.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...r/lib/dracut/modules.d/40ignition-ostree/ignition-ostree-mount-subsequent-sysroot.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[Unit] | ||
Description=CoreOS: Mount (subsequent) /sysroot | ||
# These dependencies should match the "other" in | ||
# ignition-ostree-mount-firsboot-sysroot.service | ||
DefaultDependencies=false | ||
# If root is specified, then systemd's generator will win | ||
ConditionKernelCommandLine=!root | ||
ConditionKernelCommandLine=ostree | ||
ConditionPathExists=!/run/ostree-live | ||
# There can be only one, Highlander style | ||
Conflicts=ignition-ostree-mount-firstboot-sysroot.service | ||
# And in contrast to the firstboot, we expect | ||
# the root device to be ready. | ||
Requires=dev-disk-by\x2dlabel-root.device | ||
After=dev-disk-by\x2dlabel-root.device | ||
Before=initrd-root-fs.target | ||
# This has an explicit dependency on After=sysroot.mount today | ||
Before=ostree-prepare-root.service | ||
|
||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
ExecStart=/usr/sbin/ignition-ostree-mount-sysroot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters