From dd3aa1c10d3254f596e9d57de74be27935d4c75e Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Sat, 21 Dec 2019 14:54:39 -0500 Subject: [PATCH] systemd: add coreos-installer-noreboot.service 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. --- systemd/coreos-installer-noreboot.service | 13 +++++++++++++ systemd/coreos-installer.target | 1 + 2 files changed, 14 insertions(+) create mode 100644 systemd/coreos-installer-noreboot.service diff --git a/systemd/coreos-installer-noreboot.service b/systemd/coreos-installer-noreboot.service new file mode 100644 index 000000000..009559242 --- /dev/null +++ b/systemd/coreos-installer-noreboot.service @@ -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 diff --git a/systemd/coreos-installer.target b/systemd/coreos-installer.target index 4e30c2f59..d900eec6a 100644 --- a/systemd/coreos-installer.target +++ b/systemd/coreos-installer.target @@ -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