Making the mingetty module support not only vc ttys.

svn path=/nixos/trunk/; revision=17391
This commit is contained in:
Lluís Batlle i Rossell 2009-09-23 20:50:53 +00:00
parent eab68acb35
commit b2334990db

View File

@ -15,10 +15,9 @@ in
services.mingetty = { services.mingetty = {
ttys = mkOption { ttys = mkOption {
default = [1 2 3 4 5 6]; default = [ "tty1" "tty2" "tty3" "tty4" "tty5" "tty6" ];
description = '' description = ''
The list of tty (virtual console) devices on which to start a The list of tty devices on which to start a login prompt.
login prompt.
''; '';
}; };
@ -58,13 +57,13 @@ in
config = { config = {
# Generate a separate job for each tty. # Generate a separate job for each tty.
jobs = map (ttyNumber: { jobs = map (tty: {
name = "tty${toString ttyNumber}"; name = tty;
startOn = "udev"; startOn = "udev";
exec = "${pkgs.mingetty}/sbin/mingetty --loginprog=${pkgs.pam_login}/bin/login --noclear tty${toString ttyNumber}"; exec = "${pkgs.mingetty}/sbin/mingetty --loginprog=${pkgs.pam_login}/bin/login --noclear ${tty}";
}) config.services.mingetty.ttys; }) config.services.mingetty.ttys;