mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2026-04-27 07:48:44 +02:00
service/initrd-ssh: improve login logic
Some checks failed
/ Build Nix targets (push) Has been cancelled
Some checks failed
/ Build Nix targets (push) Has been cancelled
This commit is contained in:
parent
16cc7e4dfa
commit
583ea7d3a7
1 changed files with 2 additions and 2 deletions
|
|
@ -35,7 +35,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
postCommands = lib.optionalString (cfg.mode == "grub2") ''
|
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";
|
unitConfig.DefaultDependencies = "no";
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
script = ''
|
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
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue