forked from coreos/ignition-dracut
-
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.
WIP: dracut/30ignition: Add mount stage and drop OSTree-specific bits
Add support for the new Ignition `mount` and `umount` stages. The `mount` stage runs *after* the `disks` stage and `initrd-root-fs.target`, since we need to be able to mount under `/sysroot`, but *before* the `files` stage, which will of course drop files under those mounts. Combined with coreos/fedora-coreos-config#70, this allows us to drop all OSTree-specific bits and no longer rely on `ostree-prepare-root.service` to mount `/var` for us.
- Loading branch information
Showing
5 changed files
with
28 additions
and
39 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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=Ignition (mount) | ||
DefaultDependencies=false | ||
OnFailure=emergency.target | ||
OnFailureJobMode=isolate | ||
|
||
# Make sure the final /sysroot is ready first, since we're mounting under there | ||
Requires=initrd-root-fs.target | ||
After=initrd-root-fs.target | ||
|
||
# Make sure root filesystem is remounted read-write if needed | ||
After=ignition-remount-sysroot.service | ||
|
||
# This is guaranteed through After=initrd-root-fs.target but just to | ||
# be explicit. | ||
After=ignition-disks.service | ||
|
||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
EnvironmentFile=/run/ignition.env | ||
ExecStart=/usr/bin/ignition --root=/sysroot --platform=${PLATFORM_ID} --stage=mount --log-to-stdout | ||
ExecStop=/usr/bin/ignition --root=/sysroot --platform=${PLATFORM_ID} --stage=umount --log-to-stdout |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/bash | ||
set -eu | ||
set -euo pipefail | ||
|
||
copy_file_if_exists() { | ||
src="${1}"; dst="${2}" | ||
|
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