forked from coreos/fedora-coreos-config
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
overlay.d/05core: add coreos-rootflags back to diskful sysroot.mount
In 45396d8 we started creating a static sysroot.mount to appease systemd 254+ (see [1]), but it missed the `coreos-rootflags` handling that was present in ignition-ostree-mount-sysroot.sh. This PR adds back in the dynamic rootflags by using an EnvironmentFile generated by a coreos-rootflags.service to get the same behavior. [1] coreos/fedora-coreos-tracker#1527 (comment)
- Loading branch information
Showing
3 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
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
27 changes: 27 additions & 0 deletions
27
overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-rootflags.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,27 @@ | ||
[Unit] | ||
Description=Determine root FS mount option flags | ||
DefaultDependencies=false | ||
ConditionKernelCommandLine=!root | ||
ConditionPathExists=!/run/ostree-live | ||
# Just in case. We shouldn't run twice. | ||
ConditionPathExists=!/run/coreos-rootflags | ||
# Since the sysroot.mount depends on the options generated by us | ||
# we must run before sysroot.mount | ||
Before=sysroot.mount | ||
# In case the disk was manipulated by Ignition and we need to pick | ||
# up mount options from Ignition config. | ||
After=ignition-disks.service | ||
# The script checks if the rootfs was reprovisioned so let's wait | ||
# until after that has completed if it was requested. | ||
After=ignition-ostree-transposefs-restore.service | ||
# Requires the root device to exist | ||
Requires=dev-disk-by\x2dlabel-root.device | ||
After=dev-disk-by\x2dlabel-root.device | ||
|
||
[Service] | ||
Type=oneshot | ||
StandardError=journal | ||
StandardOutput=append:/run/coreos-rootflags | ||
ExecStartPre=echo -n 'OPTIONS=' | ||
ExecStart=/usr/sbin/coreos-rootflags | ||
RemainAfterExit=yes |
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