From 966f2a6f275a8081506951656f52d980924c9c94 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Tue, 4 Sep 2018 15:48:13 +0000 Subject: [PATCH] Move etc/ttys to sbin/init/. And simplify this a little by flattening the directory structure. Approved by: re (gjb), will (mentor) Differential Revision: https://reviews.freebsd.org/D16955 --- etc/Makefile | 10 ---------- sbin/init/Makefile | 13 ++++++++++++- etc/etc.aarch64/ttys => sbin/init/ttys.aarch64 | 0 etc/etc.amd64/ttys => sbin/init/ttys.amd64 | 0 etc/etc.arm/ttys => sbin/init/ttys.arm | 0 etc/etc.i386/ttys => sbin/init/ttys.i386 | 0 etc/etc.mips/ttys => sbin/init/ttys.mips | 0 etc/etc.powerpc/ttys => sbin/init/ttys.powerpc | 0 etc/etc.riscv/ttys => sbin/init/ttys.riscv | 0 etc/etc.sparc64/ttys => sbin/init/ttys.sparc64 | 0 10 files changed, 12 insertions(+), 11 deletions(-) rename etc/etc.aarch64/ttys => sbin/init/ttys.aarch64 (100%) rename etc/etc.amd64/ttys => sbin/init/ttys.amd64 (100%) rename etc/etc.arm/ttys => sbin/init/ttys.arm (100%) rename etc/etc.i386/ttys => sbin/init/ttys.i386 (100%) rename etc/etc.mips/ttys => sbin/init/ttys.mips (100%) rename etc/etc.powerpc/ttys => sbin/init/ttys.powerpc (100%) rename etc/etc.riscv/ttys => sbin/init/ttys.riscv (100%) rename etc/etc.sparc64/ttys => sbin/init/ttys.sparc64 (100%) diff --git a/etc/Makefile b/etc/Makefile index 18672da0a129..b7d5a42ef3a5 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -35,16 +35,6 @@ BIN1= crontab \ rpc \ termcap.small -.if exists(${.CURDIR}/etc.${MACHINE}/ttys) -BIN1+= etc.${MACHINE}/ttys -.elif exists(${.CURDIR}/etc.${MACHINE_ARCH}/ttys) -BIN1+= etc.${MACHINE_ARCH}/ttys -.elif exists(${.CURDIR}/etc.${MACHINE_CPUARCH}/ttys) -BIN1+= etc.${MACHINE_CPUARCH}/ttys -.else -.error etc.MACHINE/ttys missing -.endif - # NB: keep these sorted by MK_* knobs .if ${MK_AMD} != "no" diff --git a/sbin/init/Makefile b/sbin/init/Makefile index 9a40f77598a0..5f0b7bce91d7 100644 --- a/sbin/init/Makefile +++ b/sbin/init/Makefile @@ -1,7 +1,7 @@ # @(#)Makefile 8.1 (Berkeley) 7/19/93 # $FreeBSD$ -CONFGROUPS= CONFETC CONFETCEXEC CONFETCDEFAULTS +CONFGROUPS= CONFETC CONFETCEXEC CONFETCDEFAULTS CONFTTYS CONFETCDIR= /etc CONFETC= network.subr rc rc.initdiskless rc.subr rc.shutdown CONFETCMODE= 644 @@ -19,6 +19,17 @@ INSTALLFLAGS=-b -B.bak 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 + # Needed for getmntopts.c MOUNT= ${SRCTOP}/sbin/mount CFLAGS+=-I${MOUNT} diff --git a/etc/etc.aarch64/ttys b/sbin/init/ttys.aarch64 similarity index 100% rename from etc/etc.aarch64/ttys rename to sbin/init/ttys.aarch64 diff --git a/etc/etc.amd64/ttys b/sbin/init/ttys.amd64 similarity index 100% rename from etc/etc.amd64/ttys rename to sbin/init/ttys.amd64 diff --git a/etc/etc.arm/ttys b/sbin/init/ttys.arm similarity index 100% rename from etc/etc.arm/ttys rename to sbin/init/ttys.arm diff --git a/etc/etc.i386/ttys b/sbin/init/ttys.i386 similarity index 100% rename from etc/etc.i386/ttys rename to sbin/init/ttys.i386 diff --git a/etc/etc.mips/ttys b/sbin/init/ttys.mips similarity index 100% rename from etc/etc.mips/ttys rename to sbin/init/ttys.mips diff --git a/etc/etc.powerpc/ttys b/sbin/init/ttys.powerpc similarity index 100% rename from etc/etc.powerpc/ttys rename to sbin/init/ttys.powerpc diff --git a/etc/etc.riscv/ttys b/sbin/init/ttys.riscv similarity index 100% rename from etc/etc.riscv/ttys rename to sbin/init/ttys.riscv diff --git a/etc/etc.sparc64/ttys b/sbin/init/ttys.sparc64 similarity index 100% rename from etc/etc.sparc64/ttys rename to sbin/init/ttys.sparc64