Skip to content

Commit 9cb2b0f

Browse files
genprotimg.bu: halt system after firstboot completed
We use CoreOS as base system for the FakeSecureVM, unfortunately it's not possible to generate 'sdboot' image during `firstboot`, because ignition checks for unique `boot` labeled fs, but added as a disk qemu-secex.qcow2 image has its onw 'boot' partition.
1 parent 825c503 commit 9cb2b0f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/secex-genprotimgvm-scripts/genprotimg.bu

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,16 @@ systemd:
7171
Options=rw,noatime
7272
[Install]
7373
WantedBy=default.target
74+
- name: autohalt.service
75+
enabled: true
76+
contents: |
77+
[Unit]
78+
Description=Halts system on firstboot
79+
ConditionKernelCommandLine=ignition.firstboot
80+
After=multi-user.target
81+
[Service]
82+
Type=oneshot
83+
ExecStartPre=/bin/echo "Shutting down"
84+
ExecStart=/usr/bin/systemctl --no-block poweroff
85+
[Install]
86+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)