Use setsid to get job control in debug shell

This commit is contained in:
Rodrigo Arias 2024-09-27 15:45:14 +02:00
parent edb597ad6a
commit 51efdf1a27
2 changed files with 3 additions and 1 deletions

View File

@ -65,6 +65,7 @@
bootStage2 = pkgs.substituteAll {
src = ./patches/stage-2-init.sh;
shellDebug = "${pkgs.bashInteractive}/bin/bash";
bashInteractive = "${pkgs.bashInteractive}";
shell = "${pkgs.bash}/bin/bash";
inherit (config.boot) readOnlyNixStore systemdExecutable extraSystemdUnitPaths;
inherit (config.system.nixos) distroName;

View File

@ -18,7 +18,8 @@ if [ "${IN_NIXOS_SYSTEMD_STAGE1:-}" != true ]; then
set -x
;;
debug2)
@shellDebug@ -i
export PATH="@bashInteractive@/bin:@systemConfig@/sw/bin:$PATH"
setsid bash -c "exec bash -l </dev/hvc0 >/dev/hvc0 2>/dev/hvc0"
;;
esac
done