From 583ea7d3a72a8232220f6ac74531029f6160f853 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sun, 19 Apr 2026 14:50:52 +0200 Subject: [PATCH] service/initrd-ssh: improve login logic --- modules/services/initrd-ssh/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/services/initrd-ssh/default.nix b/modules/services/initrd-ssh/default.nix index e295462..7c90de6 100644 --- a/modules/services/initrd-ssh/default.nix +++ b/modules/services/initrd-ssh/default.nix @@ -35,7 +35,7 @@ in }; postCommands = lib.optionalString (cfg.mode == "grub2") '' - echo 'cryptsetup-askpass || echo "Unlock was successful; exiting SSH session" && exit 1' >> /root/.profile + echo 'cryptsetup-askpass && { echo "Unlock was successful; exiting SSH session"; exit 0; }' >> /root/.profile ''; }; @@ -49,7 +49,7 @@ in unitConfig.DefaultDependencies = "no"; serviceConfig.Type = "oneshot"; script = '' - echo 'systemctl default || echo "Unlock was successful; exiting SSH session" && exit 1' >> /var/empty/.profile + echo 'systemctl default && { echo "Unlock was successful; exiting SSH session"; exit 0; }' >> /var/empty/.profile ''; }; };