Skip to content

Commit 23732a4

Browse files
genprotimg.bu: halt system after firstboot completed
1 parent 672f91f commit 23732a4

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

src/secex-genprotimgvm-scripts/genprotimg.bu

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,16 @@ storage:
7474
ln -sf "../genprotimg.service" "${UNIT_DIR}/default.target.wants/"
7575
systemd:
7676
units:
77-
78-
dropins:
79-
- name: autologin-core.conf
80-
contents: |
81-
[Service]
82-
TTYVTDisallocate=no
83-
ExecStart=
84-
ExecStart=-/usr/sbin/agetty --autologin core -o '-p -f core' --noclear %I $TERM
85-
mask: false
86-
87-
mask: false
77+
- name: autohalt.service
78+
enabled: true
79+
contents: |
80+
[Unit]
81+
Description=Halts system on firstboot
82+
ConditionKernelCommandLine=ignition.firstboot
83+
After=multi-user.target
84+
[Service]
85+
Type=oneshot
86+
ExecStartPre=/bin/echo "Shutting down"
87+
ExecStart=/usr/bin/systemctl --no-block poweroff
88+
[Install]
89+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)