diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2001-12-13 01:40:16 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2001-12-13 01:40:16 +0000 |
commit | 159846deaa2f9bff3b560d6a49d7c8f93d7abadc (patch) | |
tree | 4d5d8d1ca04135de48cf67051957d1090c61f2a4 /distrib/miniroot | |
parent | af0b4fb17ec3cd4f9e7dd16fd10eea00b42847f6 (diff) |
Remove /etc/protocols and /etc/services from install media
that use the miniroot install scripts.
During an install, donetconfig() in miniroot/install.sub now
creates a minimal /etc/protocols and /etc/services.
During an upgrade, enable_network() now copies the existing
protocols and services files into /etc.
Saves approximately 13K on floppy/cd images.
Diffstat (limited to 'distrib/miniroot')
-rw-r--r-- | distrib/miniroot/install.sub | 24 | ||||
-rw-r--r-- | distrib/miniroot/list | 4 |
2 files changed, 23 insertions, 5 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index e357f104093..f0542080de8 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: install.sub,v 1.178 2001/11/25 21:43:08 krw Exp $ +# $OpenBSD: install.sub,v 1.179 2001/12/13 01:40:15 krw Exp $ # $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $ # # Copyright (c) 1997,1998 Todd Miller, Theo de Raadt @@ -722,7 +722,7 @@ enable_network() { done # Copy any required or optional files found - for _netfile in hosts myname dhclient.conf resolv.conf resolv.conf.tail; do + for _netfile in hosts myname dhclient.conf resolv.conf resolv.conf.tail protocols services; do if [ -f /mnt/etc/${_netfile} ]; then cp /mnt/etc/${_netfile} /etc/${_netfile} fi @@ -2292,6 +2292,26 @@ donetconfig() { hostname $resp echo $resp > /tmp/myname + # Create minimal protocols and services for use during install + cat > /etc/protocols <<EOF +ip 0 IP +icmp 1 ICMP +tcp 6 TCP +udp 17 UDP +EOF + + cat > /etc/services <<EOF +ftp-data 20/tcp +ftp 21/tcp +domain 53/tcp nameserver +domain 53/udp nameserver +www 80/tcp http +www 80/udp +nfsd 2049/udp nfs +nfsd 2049/tcp nfs +shell 514/tcp cmd +EOF + # Always create new hosts file. If install.sh has been # restarted, an existing one may contain information which # will conflict with the information about to be entered. diff --git a/distrib/miniroot/list b/distrib/miniroot/list index 20653a6ba48..5a699e248bd 100644 --- a/distrib/miniroot/list +++ b/distrib/miniroot/list @@ -1,4 +1,4 @@ -# $OpenBSD: list,v 1.22 2001/10/02 17:01:31 deraadt Exp $ +# $OpenBSD: list,v 1.23 2001/12/13 01:40:15 krw Exp $ # $NetBSD: list,v 1.4.4.1 1996/06/20 20:30:26 pk Exp $ SRCDIRS distrib/special @@ -59,9 +59,7 @@ ARGVLINK ksh -sh COPY ${DESTDIR}/etc/group etc/group COPY ${DESTDIR}/etc/master.passwd etc/master.passwd COPY ${DESTDIR}/etc/passwd etc/passwd -COPY ${DESTDIR}/etc/protocols etc/protocols COPY ${DESTDIR}/etc/pwd.db etc/pwd.db -COPY ${DESTDIR}/etc/services etc/services COPY ${DESTDIR}/etc/spwd.db etc/spwd.db # and the installation scripts |