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: Add code to verify interactive login for Live ISO
This is similar to: coreos/ignition-dracut#146 For our test system, it generally works really well to inject things via Ignition. That PR was about handling failures in the initramfs *before* Ignition runs. This PR is trying to help us test the scenario where no Ignition is injected into the Live ISO. Let's also use the virtio-channel approach.
- Loading branch information
Showing
2 changed files
with
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,5 @@ enable afterburn-firstboot-checkin.service | |
enable [email protected] | ||
# Update agent | ||
enable zincati.service | ||
# Testing aid | ||
enable coreos-liveiso-success.service |
17 changes: 17 additions & 0 deletions
17
overlay.d/05core/usr/lib/systemd/system/coreos-liveiso-success.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,17 @@ | ||
# This is used by our test framework in coreos-assembler | ||
# since we don't have a way to inject testing configuration | ||
# via Ignition to test this scenario. | ||
[Unit] | ||
Description=CoreOS Live ISO virtio success | ||
Documentation=https://github.com/coreos/fedora-coreos-config | ||
ConditionPathExists=/run/ostree-live | ||
ConditionVirtualization=|kvm | ||
ConditionVirtualization=|qemu | ||
|
||
[Service] | ||
Type=simple | ||
# See https://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-messages.h | ||
ExecStart=/bin/sh -c 'journalctl -b -o cat -u systemd-logind.service MESSAGE_ID=8d45620c1a4348dbb17410da57c60c66 | head -1 >dev/null; echo coreos-liveiso-success > /dev/virtio-ports/coreos.liveiso-success' | ||
|
||
[Install] | ||
WantedBy=multi-user.target |