git: c76616f496ee - main - etc/ttys: merge ttys file down to single file

Mitchell Horne mhorne at FreeBSD.org
Tue Jul 6 15:00:16 UTC 2021


The branch main has been updated by mhorne:

URL: https://cgit.FreeBSD.org/src/commit/?id=c76616f496ee7e6b0a4ed9444fad56418f137a5a

commit c76616f496ee7e6b0a4ed9444fad56418f137a5a
Author:     Elliott Mitchell <ehem+freebsd at m5p.com>
AuthorDate: 2021-05-13 06:58:00 +0000
Commit:     Mitchell Horne <mhorne at FreeBSD.org>
CommitDate: 2021-07-06 14:53:10 +0000

    etc/ttys: merge ttys file down to single file
    
    The tty lists were already pretty similar and there hadn't been any real
    need for them to remain distinct for some time. As such, merge to a
    single file.
    
    The RISC-V console is preserved. For systems where it doesn't exist, its
    presence in /etc/ttys is harmless. The uncommented version of the
    ttyv8/XDM line from ttys.amd64 was the one chosen.
    
    Reviewed by:    imp
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D30256
---
 sbin/init/Makefile             | 10 +--------
 sbin/init/{ttys.riscv => ttys} |  2 +-
 sbin/init/ttys.aarch64         | 49 ------------------------------------------
 sbin/init/ttys.amd64           | 49 ------------------------------------------
 sbin/init/ttys.arm             | 49 ------------------------------------------
 sbin/init/ttys.i386            | 49 ------------------------------------------
 sbin/init/ttys.mips            | 36 -------------------------------
 sbin/init/ttys.powerpc         | 49 ------------------------------------------
 8 files changed, 2 insertions(+), 291 deletions(-)

diff --git a/sbin/init/Makefile b/sbin/init/Makefile
index 3c242617fe7a..3a914dc7acef 100644
--- a/sbin/init/Makefile
+++ b/sbin/init/Makefile
@@ -12,15 +12,7 @@ CFLAGS+=-DDEBUGSHELL -DSECURE -DLOGIN_CAP -DCOMPAT_SYSV_INIT
 LIBADD=	util crypt
 
 CONFTTYSNAME=	ttys
-.if exists(${.CURDIR}/ttys.${MACHINE})
-CONFTTYS+=	ttys.${MACHINE}
-.elif exists(${.CURDIR}/ttys.${MACHINE_ARCH})
-CONFTTYS+=	ttys.${MACHINE_ARCH}
-.elif exists(${.CURDIR}/ttys.${MACHINE_CPUARCH})
-CONFTTYS+=	ttys.${MACHINE_CPUARCH}
-.else
-.error MACHINE.ttys missing
-.endif
+CONFTTYS+=	ttys
 
 # Needed for getmntopts.c
 MOUNT=	${SRCTOP}/sbin/mount
diff --git a/sbin/init/ttys.riscv b/sbin/init/ttys
similarity index 97%
rename from sbin/init/ttys.riscv
rename to sbin/init/ttys
index 4e49b7a83bd8..4a5ee50dba59 100644
--- a/sbin/init/ttys.riscv
+++ b/sbin/init/ttys
@@ -38,7 +38,7 @@ ttyv4	"/usr/libexec/getty Pc"		xterm	onifexists secure
 ttyv5	"/usr/libexec/getty Pc"		xterm	onifexists secure
 ttyv6	"/usr/libexec/getty Pc"		xterm	onifexists secure
 ttyv7	"/usr/libexec/getty Pc"		xterm	onifexists secure
-#ttyv8	"/usr/local/bin/xdm -nodaemon"	xterm	onifexists secure
+ttyv8	"/usr/local/bin/xdm -nodaemon"	xterm	off secure
 # Serial terminals
 # The 'dialup' keyword identifies dialin lines to login, fingerd etc.
 ttyu0	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
diff --git a/sbin/init/ttys.aarch64 b/sbin/init/ttys.aarch64
deleted file mode 100644
index 8a2376e799a1..000000000000
--- a/sbin/init/ttys.aarch64
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# $FreeBSD$
-#	@(#)ttys	5.1 (Berkeley) 4/17/89
-#
-# This file specifies various information about terminals on the system.
-# It is used by several different programs.  Common entries for the
-# various columns include:
-#
-# name  The name of the terminal device.
-#
-# getty The program to start running on the terminal.  Typically a
-#       getty program, as the name implies.  Other common entries
-#       include none, when no getty is needed, and xdm, to start the
-#       X Window System.
-#
-# type The initial terminal type for this port.  For hardwired
-#      terminal lines, this will contain the type of terminal used.
-#      For virtual consoles, the correct type is typically xterm.
-#      Other common values include dialup for incoming modem ports, and
-#      unknown when the terminal type cannot be predetermined.
-#
-# status Must be on or off.  If on, init will run the getty program on
-#        the specified port.  If the word "secure" appears, this tty
-#        allows root login.
-#
-# name	getty				type	status		comments
-#
-# If console is marked "insecure", then init will ask for the root password
-# when going to single-user mode.
-console	none				unknown	off secure
-#
-ttyv0	"/usr/libexec/getty Pc"		xterm	onifexists secure
-# Virtual terminals
-ttyv1	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv2	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv3	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv4	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv5	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv6	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv7	"/usr/libexec/getty Pc"		xterm	onifexists secure
-#ttyv8	"/usr/local/bin/xdm -nodaemon"	xterm	onifexists secure
-# Serial terminals
-# The 'dialup' keyword identifies dialin lines to login, fingerd etc.
-ttyu0	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
-ttyu1	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
-ttyu2	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
-ttyu3	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
-# Dumb console
-dcons	"/usr/libexec/getty std.9600"	vt100	off secure
diff --git a/sbin/init/ttys.amd64 b/sbin/init/ttys.amd64
deleted file mode 100644
index b8392780ac9a..000000000000
--- a/sbin/init/ttys.amd64
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# $FreeBSD$
-#	@(#)ttys	5.1 (Berkeley) 4/17/89
-#
-# This file specifies various information about terminals on the system.
-# It is used by several different programs.  Common entries for the
-# various columns include:
-#
-# name  The name of the terminal device.
-#
-# getty The program to start running on the terminal.  Typically a
-#       getty program, as the name implies.  Other common entries
-#       include none, when no getty is needed, and xdm, to start the
-#       X Window System.
-#
-# type The initial terminal type for this port.  For hardwired
-#      terminal lines, this will contain the type of terminal used.
-#      For virtual consoles, the correct type is typically xterm.
-#      Other common values include dialup for incoming modem ports, and
-#      unknown when the terminal type cannot be predetermined.
-#
-# status Must be on or off.  If on, init will run the getty program on
-#        the specified port.  If the word "secure" appears, this tty
-#        allows root login.
-#
-# name	getty				type	status		comments
-#
-# If console is marked "insecure", then init will ask for the root password
-# when going to single-user mode.
-console	none				unknown	off secure
-#
-ttyv0	"/usr/libexec/getty Pc"		xterm	onifexists secure
-# Virtual terminals
-ttyv1	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv2	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv3	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv4	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv5	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv6	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv7	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv8	"/usr/local/bin/xdm -nodaemon"	xterm	off secure
-# Serial terminals
-# The 'dialup' keyword identifies dialin lines to login, fingerd etc.
-ttyu0	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
-ttyu1	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
-ttyu2	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
-ttyu3	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
-# Dumb console
-dcons	"/usr/libexec/getty std.9600"	vt100	off secure
diff --git a/sbin/init/ttys.arm b/sbin/init/ttys.arm
deleted file mode 100644
index b0722e4522dd..000000000000
--- a/sbin/init/ttys.arm
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# $FreeBSD$
-#	@(#)ttys	5.1 (Berkeley) 4/17/89
-#
-# This file specifies various information about terminals on the system.
-# It is used by several different programs.  Common entries for the
-# various columns include:
-#
-# name  The name of the terminal device.
-#
-# getty The program to start running on the terminal.  Typically a
-#       getty program, as the name implies.  Other common entries
-#       include none, when no getty is needed, and xdm, to start the
-#       X Window System.
-#
-# type The initial terminal type for this port.  For hardwired
-#      terminal lines, this will contain the type of terminal used.
-#      For virtual consoles, the correct type is typically xterm.
-#      Other common values include dialup for incoming modem ports, and
-#      unknown when the terminal type cannot be predetermined.
-#
-# status Must be on or off.  If on, init will run the getty program on
-#        the specified port.  If the word "secure" appears, this tty
-#        allows root login.
-#
-# name	getty				type	status		comments
-#
-# If console is marked "insecure", then init will ask for the root password
-# when going to single-user mode.
-console	none				unknown	off secure
-#
-ttyv0	"/usr/libexec/getty Pc"		xterm	onifexists secure
-# Virtual terminals
-ttyv1	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv2	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv3	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv4	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv5	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv6	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv7	"/usr/libexec/getty Pc"		xterm	onifexists secure
-#ttyv8	"/usr/local/bin/xdm -nodaemon"	xterm	off secure
-# Serial terminals
-# The 'dialup' keyword identifies dialin lines to login, fingerd etc.
-ttyu0	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
-ttyu1	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
-ttyu2	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
-ttyu3	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
-# Dumb console
-dcons	"/usr/libexec/getty std.9600"	vt100	off secure
diff --git a/sbin/init/ttys.i386 b/sbin/init/ttys.i386
deleted file mode 100644
index b8392780ac9a..000000000000
--- a/sbin/init/ttys.i386
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# $FreeBSD$
-#	@(#)ttys	5.1 (Berkeley) 4/17/89
-#
-# This file specifies various information about terminals on the system.
-# It is used by several different programs.  Common entries for the
-# various columns include:
-#
-# name  The name of the terminal device.
-#
-# getty The program to start running on the terminal.  Typically a
-#       getty program, as the name implies.  Other common entries
-#       include none, when no getty is needed, and xdm, to start the
-#       X Window System.
-#
-# type The initial terminal type for this port.  For hardwired
-#      terminal lines, this will contain the type of terminal used.
-#      For virtual consoles, the correct type is typically xterm.
-#      Other common values include dialup for incoming modem ports, and
-#      unknown when the terminal type cannot be predetermined.
-#
-# status Must be on or off.  If on, init will run the getty program on
-#        the specified port.  If the word "secure" appears, this tty
-#        allows root login.
-#
-# name	getty				type	status		comments
-#
-# If console is marked "insecure", then init will ask for the root password
-# when going to single-user mode.
-console	none				unknown	off secure
-#
-ttyv0	"/usr/libexec/getty Pc"		xterm	onifexists secure
-# Virtual terminals
-ttyv1	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv2	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv3	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv4	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv5	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv6	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv7	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv8	"/usr/local/bin/xdm -nodaemon"	xterm	off secure
-# Serial terminals
-# The 'dialup' keyword identifies dialin lines to login, fingerd etc.
-ttyu0	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
-ttyu1	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
-ttyu2	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
-ttyu3	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
-# Dumb console
-dcons	"/usr/libexec/getty std.9600"	vt100	off secure
diff --git a/sbin/init/ttys.mips b/sbin/init/ttys.mips
deleted file mode 100644
index 21bb9325f3bf..000000000000
--- a/sbin/init/ttys.mips
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# $FreeBSD$
-#	@(#)ttys	5.1 (Berkeley) 4/17/89
-#
-# This file specifies various information about terminals on the system.
-# It is used by several different programs.  Common entries for the
-# various columns include:
-#
-# name  The name of the terminal device.
-#
-# getty The program to start running on the terminal.  Typically a
-#       getty program, as the name implies.  Other common entries
-#       include none, when no getty is needed, and xdm, to start the
-#       X Window System.
-#
-# type The initial terminal type for this port.  For hardwired
-#      terminal lines, this will contain the type of terminal used.
-#      For virtual consoles, the correct type is typically xterm.
-#      Other common values include dialup for incoming modem ports, and
-#      unknown when the terminal type cannot be predetermined.
-#
-# status Must be on or off.  If on, init will run the getty program on
-#        the specified port.  If the word "secure" appears, this tty
-#        allows root login.
-#
-# name	getty				type	status		comments
-#
-# If console is marked "insecure", then init will ask for the root password
-# when going to single-user mode.
-console	none				unknown	off secure
-# Serial terminals
-# The 'dialup' keyword identifies dialin lines to login, fingerd etc.
-ttyu0	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
-ttyu1	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
-ttyu2	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
-ttyu3	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
diff --git a/sbin/init/ttys.powerpc b/sbin/init/ttys.powerpc
deleted file mode 100644
index b0722e4522dd..000000000000
--- a/sbin/init/ttys.powerpc
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# $FreeBSD$
-#	@(#)ttys	5.1 (Berkeley) 4/17/89
-#
-# This file specifies various information about terminals on the system.
-# It is used by several different programs.  Common entries for the
-# various columns include:
-#
-# name  The name of the terminal device.
-#
-# getty The program to start running on the terminal.  Typically a
-#       getty program, as the name implies.  Other common entries
-#       include none, when no getty is needed, and xdm, to start the
-#       X Window System.
-#
-# type The initial terminal type for this port.  For hardwired
-#      terminal lines, this will contain the type of terminal used.
-#      For virtual consoles, the correct type is typically xterm.
-#      Other common values include dialup for incoming modem ports, and
-#      unknown when the terminal type cannot be predetermined.
-#
-# status Must be on or off.  If on, init will run the getty program on
-#        the specified port.  If the word "secure" appears, this tty
-#        allows root login.
-#
-# name	getty				type	status		comments
-#
-# If console is marked "insecure", then init will ask for the root password
-# when going to single-user mode.
-console	none				unknown	off secure
-#
-ttyv0	"/usr/libexec/getty Pc"		xterm	onifexists secure
-# Virtual terminals
-ttyv1	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv2	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv3	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv4	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv5	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv6	"/usr/libexec/getty Pc"		xterm	onifexists secure
-ttyv7	"/usr/libexec/getty Pc"		xterm	onifexists secure
-#ttyv8	"/usr/local/bin/xdm -nodaemon"	xterm	off secure
-# Serial terminals
-# The 'dialup' keyword identifies dialin lines to login, fingerd etc.
-ttyu0	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
-ttyu1	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
-ttyu2	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
-ttyu3	"/usr/libexec/getty 3wire"	vt100	onifconsole secure
-# Dumb console
-dcons	"/usr/libexec/getty std.9600"	vt100	off secure


More information about the dev-commits-src-main mailing list