mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
Adding a parameter 'ttyEmergency'
It specifies what mingetty will be stopped, if a bad filesystem triggers an emergency shell. That should be ttyS0 on headless systems, and in that case, nixos should stop the ttyS0 mingetty from getting in.
This commit is contained in:
parent
97c74bf050
commit
5ee79c5722
1 changed files with 11 additions and 1 deletions
|
@ -156,6 +156,16 @@ in
|
|||
description = "Names of supported filesystem types in the initial ramdisk.";
|
||||
};
|
||||
|
||||
boot.ttyEmergency = mkOption {
|
||||
default =
|
||||
if pkgs.stdenv.isArm
|
||||
then "ttyS0" # presumably an embedded platform such as a plug
|
||||
else "tty1";
|
||||
description = ''
|
||||
The tty that will be stopped in case an emergency shell is spawned
|
||||
at boot.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
@ -247,7 +257,7 @@ in
|
|||
status="$(status xserver || true)"
|
||||
[[ "$status" =~ start/ ]] && exit 0
|
||||
|
||||
stop tty1 || true
|
||||
stop ${config.boot.ttyEmergency} || true
|
||||
|
||||
start --no-wait emergency-shell \
|
||||
DEVICE="$DEVICE" MOUNTPOINT="$MOUNTPOINT"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue