diff options
author | Brad Davis <brd@FreeBSD.org> | 2018-09-17 18:56:47 +0000 |
---|---|---|
committer | Brad Davis <brd@FreeBSD.org> | 2018-09-17 18:56:47 +0000 |
commit | 03452a498cd474fcc1edcaafa9cbb024fef2c479 (patch) | |
tree | d60bfcafaa1c97a6dff350008e62e7b988f37b01 | |
parent | 87bdca8290e725e557d5c71c414e9bf5f68f5a5c (diff) | |
download | src-03452a498cd474fcc1edcaafa9cbb024fef2c479.tar.gz src-03452a498cd474fcc1edcaafa9cbb024fef2c479.zip |
Move hosts, hosts.equiv, networks, nsswitch.conf, protocols to lib/libc/net/
This uses relative paths to make it more specific to avoid any potential
future problems with .PATH and leverages CONFS.
libc was picked as the destination location for these because of the syscalls
that use these files as the lowest level place they are referenced.
Approved by: re (gjb), will (mentor)
Differential Revision: https://reviews.freebsd.org/D17164
Notes
Notes:
svn path=/head/; revision=338729
-rw-r--r-- | etc/Makefile | 9 | ||||
-rw-r--r-- | lib/libc/net/Makefile.inc | 6 | ||||
-rw-r--r-- | lib/libc/net/hosts (renamed from etc/hosts) | 0 | ||||
-rw-r--r-- | lib/libc/net/hosts.equiv (renamed from etc/hosts.equiv) | 0 | ||||
-rw-r--r-- | lib/libc/net/networks (renamed from etc/networks) | 0 | ||||
-rw-r--r-- | lib/libc/net/nsswitch.conf (renamed from etc/nsswitch.conf) | 0 | ||||
-rw-r--r-- | lib/libc/net/protocols (renamed from etc/protocols) | 0 |
7 files changed, 6 insertions, 9 deletions
diff --git a/etc/Makefile b/etc/Makefile index 71283a973eaa..91eaa0ca50fc 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -16,18 +16,13 @@ BIN1= \ dhclient.conf \ disktab \ group \ - hosts \ hosts.allow \ - hosts.equiv \ libalias.conf \ libmap.conf \ login.access \ mac.conf \ netconfig \ - networks \ - nsswitch.conf \ phones \ - protocols \ rc.bsdextended \ rc.firewall \ remote \ @@ -160,10 +155,6 @@ distribution: ${DESTDIR}/boot/device.hints .endif .endif -.if ${MK_NIS} == "no" - sed -i "" -e 's/.*_compat:/# &/' -e 's/compat$$/files/' \ - ${DESTDIR}/etc/nsswitch.conf -.endif MTREE_CMD?= mtree diff --git a/lib/libc/net/Makefile.inc b/lib/libc/net/Makefile.inc index 304c465b8545..b31c1a36fcfe 100644 --- a/lib/libc/net/Makefile.inc +++ b/lib/libc/net/Makefile.inc @@ -4,6 +4,7 @@ # machine-independent net sources .PATH: ${LIBC_SRCTOP}/net +CONFS+= net/hosts net/hosts.equiv net/networks net/nsswitch.conf net/protocols SRCS+= base64.c ether_addr.c eui64.c \ gai_strerror.c getaddrinfo.c \ gethostbydns.c gethostbyht.c gethostbynis.c gethostnamadr.c \ @@ -123,3 +124,8 @@ SRCS+= hesiod.c MAN+= hesiod.3 .endif +.if ${MK_NIS} == "no" +afterinstallconfig: + sed -i "" -e 's/.*_compat:/# &/' -e 's/compat$$/files/' \ + ${DESTDIR}/etc/nsswitch.conf +.endif diff --git a/etc/hosts b/lib/libc/net/hosts index 2690a9ad48e1..2690a9ad48e1 100644 --- a/etc/hosts +++ b/lib/libc/net/hosts diff --git a/etc/hosts.equiv b/lib/libc/net/hosts.equiv index d8a71c1ebc7f..d8a71c1ebc7f 100644 --- a/etc/hosts.equiv +++ b/lib/libc/net/hosts.equiv diff --git a/etc/networks b/lib/libc/net/networks index a6b15d4519b7..a6b15d4519b7 100644 --- a/etc/networks +++ b/lib/libc/net/networks diff --git a/etc/nsswitch.conf b/lib/libc/net/nsswitch.conf index e0f14af76f2d..e0f14af76f2d 100644 --- a/etc/nsswitch.conf +++ b/lib/libc/net/nsswitch.conf diff --git a/etc/protocols b/lib/libc/net/protocols index 05702d430da1..05702d430da1 100644 --- a/etc/protocols +++ b/lib/libc/net/protocols |