Skip to content

Commit

Permalink
systemd: add coreos-installer-noreboot.service
Browse files Browse the repository at this point in the history
Let's drop to a shell if the user doesn't want to reboot for whatever
reason. Otherwise we just idle in the coreos-installer.target but you
can't do anything because you have no shell.
  • Loading branch information
dustymabe committed Jan 6, 2020
1 parent 352af2d commit dd3aa1c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions systemd/coreos-installer-noreboot.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=Give Login Shell After CoreOS Installer
After=coreos-installer.service
ConditionPathExists=!/run/coreos-installer-reboot

[Service]
Type=oneshot
StandardInput=tty-force
StandardOutput=inherit
StandardError=inherit
ExecStartPre=/usr/bin/echo -e "\nCoreOS install complete. Starting login shell\n"
ExecStart=/usr/sbin/sulogin --force
ExecStartPost=/usr/bin/systemctl --no-block reboot
1 change: 1 addition & 0 deletions systemd/coreos-installer.target
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ AllowIsolate=yes

Requires=coreos-installer.service
Requires=coreos-installer-reboot.service
Requires=coreos-installer-noreboot.service

# Run after most things are up
Requires=basic.target
Expand Down

0 comments on commit dd3aa1c

Please sign in to comment.