1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-16 11:43:21 +03:00

Merge pull request #287 from samueldr-wip/fix/initrd-job-control

initrd-shell: Fix job control
This commit is contained in:
Samuel Dionne-Riel 2021-01-25 16:58:03 -05:00 committed by GitHub
commit b2bc8edf9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,8 @@ in
(pkgs.writeText "system-shell.rb" ''
module System
def self.shell()
cmd = %q{setsid /bin/sh -c /bin/sh < /dev/${cfg.console} >/dev/${cfg.console} 2>/dev/${cfg.console}}
# `cttyhack` ensures we get job control (^C, ^Z) going.
cmd = %q{setsid /bin/sh -c 'setsid cttyhack sh; exec ash -mi' < /dev/${cfg.console} >/dev/${cfg.console} 2>/dev/${cfg.console}}
$logger.debug(" $ #{cmd}")
puts("\nExit this shell (CTRL+D) to resume booting.\n")
system(cmd)