3
0
Fork 0
forked from mirrors/nixpkgs

Rename mingetty module to agetty

This commit is contained in:
Eelco Dolstra 2012-06-18 17:55:27 -04:00
parent 4c21857ee1
commit 9f5051b76c
3 changed files with 34 additions and 57 deletions

View file

@ -165,7 +165,7 @@
./services/system/nscd.nix ./services/system/nscd.nix
./services/system/uptimed.nix ./services/system/uptimed.nix
./services/ttys/gpm.nix ./services/ttys/gpm.nix
./services/ttys/mingetty.nix ./services/ttys/agetty.nix
./services/web-servers/apache-httpd/default.nix ./services/web-servers/apache-httpd/default.nix
./services/web-servers/jboss/default.nix ./services/web-servers/jboss/default.nix
./services/web-servers/tomcat.nix ./services/web-servers/tomcat.nix

View file

@ -10,6 +10,7 @@ with pkgs.lib;
services.mingetty = { services.mingetty = {
# FIXME
ttys = mkOption { ttys = mkOption {
default = default =
if pkgs.stdenv.isArm if pkgs.stdenv.isArm
@ -40,7 +41,7 @@ with pkgs.lib;
helpLine = mkOption { helpLine = mkOption {
default = ""; default = "";
description = '' description = ''
Help line printed by mingetty below the welcome line. Help line printed by mingetty below the welcome line.
Used by the installation CD to give some hints on Used by the installation CD to give some hints on
how to proceed. how to proceed.
''; '';
@ -56,25 +57,39 @@ with pkgs.lib;
config = { config = {
# Generate a separate job for each tty. # Generate a separate job for each tty.
/* boot.systemd.units."getty@.service".text =
jobs = listToAttrs (map (tty: nameValuePair tty { ''
[Unit]
Description=Getty on %I
Documentation=man:agetty(8)
After=systemd-user-sessions.service plymouth-quit-wait.service
startOn = # If additional gettys are spawned during boot then we should make
# On tty1 we should always wait for mountall, since it may # sure that this is synchronized before getty.target, even though
# start an emergency-shell job. # getty.target didn't actually pull it in.
if config.services.mingetty.waitOnMounts || tty == "tty1" Before=getty.target
then "stopped udevtrigger and filesystem" IgnoreOnIsolate=yes
else "stopped udevtrigger"; # !!! should start as soon as the tty device is created
path = [ pkgs.mingetty ]; [Service]
Environment=TERM=linux
exec = "mingetty --loginprog=${pkgs.shadow}/bin/login --noclear ${tty}"; Environment=LOCALE_ARCHIVE=/var/run/current-system/sw/lib/locale/locale-archive
ExecStart=@${pkgs.utillinux}/sbin/agetty agetty --noclear --login-program ${pkgs.shadow}/bin/login %I 38400
environment.LOCALE_ARCHIVE = "/var/run/current-system/sw/lib/locale/locale-archive"; Type=idle
Restart=always
}) config.services.mingetty.ttys); RestartSec=0
*/ UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
KillMode=process
IgnoreSIGPIPE=no
# Some login implementations ignore SIGTERM, so we send SIGHUP
# instead, to ensure that login terminates cleanly.
KillSignal=SIGHUP
'';
environment.etc = singleton environment.etc = singleton
{ # Friendly greeting on the virtual consoles. { # Friendly greeting on the virtual consoles.
source = pkgs.writeText "issue" '' source = pkgs.writeText "issue" ''

View file

@ -234,42 +234,6 @@ let
KillSignal=SIGHUP KillSignal=SIGHUP
''; '';
gettyService =
''
[Unit]
Description=Getty on %I
Documentation=man:agetty(8)
After=systemd-user-sessions.service plymouth-quit-wait.service
# If additional gettys are spawned during boot then we should make
# sure that this is synchronized before getty.target, even though
# getty.target didn't actually pull it in.
Before=getty.target
IgnoreOnIsolate=yes
[Service]
Environment=TERM=linux
ExecStart=-${pkgs.utillinux}/sbin/agetty --noclear --login-program ${pkgs.shadow}/bin/login %I 38400
Type=idle
Restart=always
RestartSec=0
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
KillMode=process
IgnoreSIGPIPE=no
# Unset locale for the console getty since the console has problems
# displaying some internationalized messages.
Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION=
# Some login implementations ignore SIGTERM, so we send SIGHUP
# instead, to ensure that login terminates cleanly.
KillSignal=SIGHUP
'';
serviceToUnit = name: def: serviceToUnit = name: def:
{ inherit (def) wantedBy; { inherit (def) wantedBy;
@ -407,9 +371,7 @@ in
]; ];
boot.systemd.units = boot.systemd.units =
{ "rescue.service".text = rescueService; { "rescue.service".text = rescueService; }
"getty@.service".text = gettyService;
}
// mapAttrs serviceToUnit cfg.services; // mapAttrs serviceToUnit cfg.services;
}; };