From 176010973c918f92320da89b82df6b135803bde8 Mon Sep 17 00:00:00 2001 From: Itxaka Date: Mon, 15 Jul 2024 19:52:48 +0200 Subject: [PATCH] set kairos services to simple (#970) If they are of type oneshot, systemd will wait until the pid exits before markling the service as running. Instead it will mark them as starting which is wrong and on livecd it causes the systemctl status output to be on starting forever. Instead lets set those services to simple, which means they will be marked as started once the binary has been launched. Signed-off-by: Itxaka --- packages/static/kairos-overlay-files/collection.yaml | 2 +- .../files/etc/systemd/system/kairos-interactive.service | 5 ++++- .../files/etc/systemd/system/kairos-recovery.service | 4 ++-- .../files/etc/systemd/system/kairos.service | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/static/kairos-overlay-files/collection.yaml b/packages/static/kairos-overlay-files/collection.yaml index b00c774..25647b0 100644 --- a/packages/static/kairos-overlay-files/collection.yaml +++ b/packages/static/kairos-overlay-files/collection.yaml @@ -1,4 +1,4 @@ packages: - name: "kairos-overlay-files" category: "static" - version: "1.1.41" + version: "1.1.42" diff --git a/packages/static/kairos-overlay-files/files/etc/systemd/system/kairos-interactive.service b/packages/static/kairos-overlay-files/files/etc/systemd/system/kairos-interactive.service index 29e9fec..a8da4c8 100644 --- a/packages/static/kairos-overlay-files/files/etc/systemd/system/kairos-interactive.service +++ b/packages/static/kairos-overlay-files/files/etc/systemd/system/kairos-interactive.service @@ -1,7 +1,8 @@ [Unit] Description=kairos interactive-installer -After=sysinit.target +After=multi-user.target [Service] +## Dont mark it as running until it finishes Type=oneshot # input/output to tty as its interactive # otherwise it will be silent and with no input @@ -17,5 +18,7 @@ ExecStart=/usr/bin/kairos-agent interactive-install --shell # Start systemd messages on tty ExecStartPost=-/usr/bin/kill -SIGRTMIN+20 1 TimeoutStopSec=10s +# Restart if it fails, like user doing control+c +Restart=on-failure [Install] WantedBy=multi-user.target diff --git a/packages/static/kairos-overlay-files/files/etc/systemd/system/kairos-recovery.service b/packages/static/kairos-overlay-files/files/etc/systemd/system/kairos-recovery.service index aad01f1..4717b64 100644 --- a/packages/static/kairos-overlay-files/files/etc/systemd/system/kairos-recovery.service +++ b/packages/static/kairos-overlay-files/files/etc/systemd/system/kairos-recovery.service @@ -1,8 +1,8 @@ [Unit] Description=kairos recovery -After=sysinit.target +After=multi-user.target [Service] -Type=oneshot +Type=simple StandardInput=tty StandardOutput=tty LimitNOFILE=49152 diff --git a/packages/static/kairos-overlay-files/files/etc/systemd/system/kairos.service b/packages/static/kairos-overlay-files/files/etc/systemd/system/kairos.service index 5a029a7..3a09fe3 100644 --- a/packages/static/kairos-overlay-files/files/etc/systemd/system/kairos.service +++ b/packages/static/kairos-overlay-files/files/etc/systemd/system/kairos.service @@ -1,8 +1,8 @@ [Unit] Description=kairos installer -After=sysinit.target +After=multi-user.target [Service] -Type=oneshot +Type=simple StandardInput=tty StandardOutput=tty LimitNOFILE=49152