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.
s390x: workaround broken 'coreos-boot-disk' in 01-secex.ign config fo…
…r RHCOS BZ: https://bugzilla.redhat.com/show_bug.cgi?id=2075085 RHCOS may have (and has now) kernel with a known issue, which makes not possible to use 'coreos-boot-disk' symlink in the config. Once we have kernel >= 4.18.0-387.el8.s390x we should revert this commit Signed-off-by: Nikita Dubrovskii <[email protected]>
- Loading branch information
1 parent
29bc2f9
commit d39fa86
Showing
5 changed files
with
36 additions
and
4 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
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
18 changes: 18 additions & 0 deletions
18
....d/05core/usr/lib/dracut/modules.d/40ignition-ostree/ignition-ostree-secex-config.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,18 @@ | ||
# RHOCS 4.12.s390x has an old kernel with a known issue: https://bugzilla.redhat.com/show_bug.cgi?id=2075085 | ||
# Once we have kernel >= 4.18.0-387.el8.s390x we should drop this unit and copy config in coreos-diskful-generator | ||
[Unit] | ||
Description=Ignition OSTree: Inject secex config | ||
DefaultDependencies=false | ||
ConditionArchitecture=s390x | ||
ConditionKernelCommandLine=ostree | ||
ConditionPathExists=/run/coreos/secure-execution | ||
OnFailure=emergency.target | ||
OnFailureJobMode=isolate | ||
|
||
After=cryptsetup.target | ||
Before=ignition-fetch-offline.service | ||
|
||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
ExecStart=/usr/libexec/ignition-ostree-secex-config |
7 changes: 7 additions & 0 deletions
7
overlay.d/05core/usr/lib/dracut/modules.d/40ignition-ostree/ignition-ostree-secex-config.sh
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,7 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
if [[ -f /run/coreos/secure-execution ]]; then | ||
bootdev=$(blkid --list-one --output device --match-token PARTLABEL=boot | sed 's,[0-9]\+$,,') | ||
sed "s,\${BOOTDEV},$bootdev," < /usr/lib/coreos/01-secex.ign > /usr/lib/ignition/base.d/01-secex.ign | ||
fi |
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