summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2000-12-19 20:55:56 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2000-12-19 20:55:56 +0000
commit0eeb2a2859f4c34206a9d5cf4288124acb9d4ac5 (patch)
tree89a561ed9ba82cdb7f3b3ef67a88e513c2957a33 /distrib
parenta61c8f0d8defae086de07dc44b0b3eff2b322f07 (diff)
bye bye
Diffstat (limited to 'distrib')
-rw-r--r--distrib/pc532/floppies/Makefile.inc4
-rw-r--r--distrib/pc532/floppies/inst-common/Makefile.inc109
-rw-r--r--distrib/pc532/floppies/inst-common/cloak.c93
-rw-r--r--distrib/pc532/floppies/inst-common/dot.commonutils137
-rw-r--r--distrib/pc532/floppies/inst-common/download.c533
-rw-r--r--distrib/pc532/floppies/inst-common/go.c50
-rw-r--r--distrib/pc532/floppies/inst-common/inject.c124
-rw-r--r--distrib/pc532/floppies/inst-common/instbin.conf43
-rw-r--r--distrib/pc532/floppies/inst-common/list108
-rw-r--r--distrib/pc532/floppies/inst-common/memory_map5
-rw-r--r--distrib/pc532/floppies/inst-common/mtree.conf123
-rw-r--r--distrib/pc532/floppies/inst-common/termcap.vt10016
-rw-r--r--distrib/pc532/floppies/inst/Makefile8
-rw-r--r--distrib/pc532/floppies/inst/disktab.preinstall31
-rw-r--r--distrib/pc532/floppies/inst/dot.hdprofile62
-rw-r--r--distrib/pc532/floppies/inst/dot.instutils157
-rw-r--r--distrib/pc532/floppies/inst/dot.profile57
-rw-r--r--distrib/pc532/floppies/inst/install.sh476
-rw-r--r--distrib/pc532/floppies/inst/list11
-rw-r--r--distrib/pc532/floppies/list2sh.awk44
-rw-r--r--distrib/pc532/floppies/runlist.sh13
-rw-r--r--distrib/pc532/floppies/upgr/Makefile8
-rw-r--r--distrib/pc532/floppies/upgr/dot.hdprofile62
-rw-r--r--distrib/pc532/floppies/upgr/dot.profile57
-rw-r--r--distrib/pc532/floppies/upgr/dot.upgrutils58
-rw-r--r--distrib/pc532/floppies/upgr/list8
-rw-r--r--distrib/pc532/floppies/upgr/upgrade.sh253
-rw-r--r--distrib/sets/README125
-rw-r--r--distrib/utils/Makefile5
-rw-r--r--distrib/utils/Makefile.inc8
-rw-r--r--distrib/utils/README43
-rw-r--r--distrib/utils/init_s/Makefile19
-rw-r--r--distrib/utils/libhack/Makefile20
-rw-r--r--distrib/utils/libhack/Makefile.inc26
-rw-r--r--distrib/utils/libhack/getgrent.c188
-rw-r--r--distrib/utils/libhack/gethost.c267
-rw-r--r--distrib/utils/libhack/getnetgr.c34
-rw-r--r--distrib/utils/libhack/getpwent.c172
-rw-r--r--distrib/utils/libhack/yplib.c223
-rw-r--r--distrib/utils/ssh/Makefile10
-rw-r--r--distrib/utils/ssh/ssh.c609
-rw-r--r--distrib/utils/tls/Makefile10
-rw-r--r--distrib/utils/tls/tls.c155
-rw-r--r--distrib/utils/x_ifconfig/Makefile15
44 files changed, 0 insertions, 4579 deletions
diff --git a/distrib/pc532/floppies/Makefile.inc b/distrib/pc532/floppies/Makefile.inc
deleted file mode 100644
index 9490351545f..00000000000
--- a/distrib/pc532/floppies/Makefile.inc
+++ /dev/null
@@ -1,4 +0,0 @@
-# $OpenBSD: Makefile.inc,v 1.5 2000/03/01 22:10:05 todd Exp $
-
-# Revision is 1.2
-REV= 12
diff --git a/distrib/pc532/floppies/inst-common/Makefile.inc b/distrib/pc532/floppies/inst-common/Makefile.inc
deleted file mode 100644
index de16a407fa1..00000000000
--- a/distrib/pc532/floppies/inst-common/Makefile.inc
+++ /dev/null
@@ -1,109 +0,0 @@
-# $OpenBSD: Makefile.inc,v 1.6 1997/09/26 02:10:00 millert Exp $
-# $NetBSD: Makefile.inc,v 1.5.4.2 1996/08/07 07:29:42 phil Exp $
-
-# TOP is assumed to be defined by Makefile including this one.
-
-CBIN= instbin
-COMMONDIR= ${TOP}/inst-common
-
-MOUNT_POINT?= /mnt
-VND?= svnd0
-VND_DEV= /dev/${VND}a
-VND_RDEV= /dev/r${VND}a
-IMAGE?= xxx-${REV}.fs
-MDEC= ${DESTDIR}/usr/mdec
-
-LISTS= ${COMMONDIR}/list ${.CURDIR}/list
-CRUNCHCONF= ${COMMONDIR}/${CBIN}.conf
-MTREE= ${COMMONDIR}/mtree.conf
-ADIR= ${TOP}/../../../sys/arch/pc532
-PWDSRC= ${TOP}/../../../usr.sbin/pwd_mkdb
-.if exists(${PWDSRC}/obj)
-PWDOBJ= ${PWDSRC}/obj
-.else
-PWDOBJ= ${PWDSRC}
-.endif
-
-all: netbsd
- dd if=/dev/zero of=${IMAGE} bs=18k count=80
- disklabel -r -w ${.OBJDIR}/${IMAGE} boot3 2>/dev/null
- -yes|bim -c init -c "add ${MDEC}/boot boot" -c "default 0" \
- -c "exit" ${.OBJDIR}/${IMAGE} 2>/dev/null >/dev/null
- vnconfig -v -c ${VND_DEV} ${IMAGE}
- disklabel -w -r ${VND} boot3
- newfs -b 8192 -f 1024 -O -m 0 -o space -i 204800 -c 80 ${VND_RDEV}
- mount ${VND_DEV} ${MOUNT_POINT}
- cp netbsd ${MOUNT_POINT}/netbsd
- @df -i ${MOUNT_POINT}
- @echo ""
- umount ${MOUNT_POINT}
- vnconfig -u ${VND_DEV}
-
-inject.fs: ${CBIN} ${LISTS} netbsd.gz
- (cd ${PWDSRC}; ${MAKE})
- ${CC} -static -o pwd_mkdb ${PWDOBJ}/*.o -lutil
-.ifndef SD
- dd if=/dev/zero of=${.TARGET} bs=128k count=16
- vnconfig -v -c ${VND_DEV} ${.TARGET}
- disklabel -w -r ${VND} rd
- newfs -b 8192 -f 1024 -O -m 0 -o space -i 7168 ${VND_RDEV}
- mount ${VND_DEV} ${MOUNT_POINT}
-.else
- newfs -b 8192 -f 1024 -O -m 0 -o space -i 7168 -s 4096 \
- -t 1 -u 256 /dev/r${SD}
- mount /dev/${SD} ${MOUNT_POINT}
-.endif
- mtree -def ${MTREE} -p ${MOUNT_POINT}/ -u
- TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
- TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${LISTS}
- @echo ""
- @df -i ${MOUNT_POINT}
- @echo ""
- umount ${MOUNT_POINT}
-.ifndef SD
- vnconfig -u ${VND_DEV}
-.else
- dd if=/dev/${SD} of=${.TARGET} bs=128k count=16
-.endif
-
-unconfig:
- -umount -f ${MOUNT_POINT}
- -vnconfig -u ${VND_DEV}
- -/bin/rm -f ${IMAGE}
-
-${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
- crunchgen -D ${TOP}/../../.. -L ${DESTDIR}/usr/lib ${CRUNCHCONF}
-
-${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
- make -f ${CBIN}.mk all
-
-cloak: ${COMMONDIR}/cloak.c
-
-inject: ${COMMONDIR}/inject.c
-
-netbsd.gz:
- gzip -9 <${ADIR}/compile/DEFAULT/netbsd >netbsd.gz
-# cp ${ADIR}/compile/DEFAULT/netbsd /var/tmp/$$$$; \
-# strip /var/tmp/$$$$; \
-# gzip -9 </var/tmp/$$$$ >netbsd.gz; \
-# rm /var/tmp/$$$$
-
-
-netbsd.o: inject cloak inject.fs
- cp ${ADIR}/compile/INSTALL/netbsd /var/tmp/$$$$; \
- strip /var/tmp/$$$$; \
- ./inject /var/tmp/$$$$ inject.fs; \
- gzip -9 </var/tmp/$$$$ | ./cloak >netbsd.o; \
- rm /var/tmp/$$$$
-
-go.o: ${COMMONDIR}/go.c
-
-netbsd: netbsd.o go.o
- ld -s -z -T 240000 -e _go go.o netbsd.o ${MDEC}/zboot.o -o netbsd
-
-clean cleandir:
- /bin/rm -f core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache *.o *.lo *.c
- /bin/rm -f netbsd* inject* cloak pwd_mkdb
-
-.include <bsd.obj.mk>
-.include <bsd.subdir.mk>
diff --git a/distrib/pc532/floppies/inst-common/cloak.c b/distrib/pc532/floppies/inst-common/cloak.c
deleted file mode 100644
index ef9a10ed40c..00000000000
--- a/distrib/pc532/floppies/inst-common/cloak.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/* $OpenBSD: cloak.c,v 1.3 2000/03/01 22:10:07 todd Exp $ */
-/*
- * Copyright (c) 1995 Matthias Pfaller.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Matthias Pfaller.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#include <stdio.h>
-#include <unistd.h>
-#include <a.out.h>
-#include <sys/param.h>
-
-#define SYM_DATA "_input_data"
-#define SYM_LEN "_input_len"
-void
-writex(int fd, void *buf, int cnt, char *prog)
-{
- if (write(fd, buf, cnt) != cnt) {
- perror(prog);
- exit(1);
- }
-}
-
-main(int argc, char **argv)
-{
- int n, data_len = 0;
- static struct exec exec;
- static struct nlist nlist[2];
- static char buf[10240];
-
- if (argc != 1) {
- fprintf(stderr, "usage: %s <file1 >file2", argv[0]);
- exit(1);
- }
- writex(1, &exec, sizeof(exec), argv[0]);
- while ((n = read(0, buf, sizeof(buf))) > 0) {
- data_len += n;
- writex(1, buf, n, argv[0]);
- }
-
- memset(buf, 0, sizeof(buf));
- if (ALIGN(data_len) - data_len)
- writex(1, buf, ALIGN(data_len) - data_len, argv[0]);
- writex(1, (void *)&data_len, sizeof(data_len), argv[0]);
-
- n = sizeof(SYM_DATA) + sizeof(SYM_LEN) + sizeof(n);
- nlist[0].n_un.n_strx = sizeof(n);
- nlist[0].n_type = N_TEXT | N_EXT;
- nlist[0].n_value = 0;
- nlist[1].n_un.n_strx = nlist[0].n_un.n_strx + sizeof(SYM_DATA);
- nlist[1].n_type = N_TEXT | N_EXT;
- nlist[1].n_value = ALIGN(data_len);
- writex(1, nlist, sizeof(nlist), argv[0]);
- writex(1, &n, sizeof(n), argv[0]);
- writex(1, SYM_DATA, sizeof(SYM_DATA), argv[0]);
- writex(1, SYM_LEN, sizeof(SYM_LEN), argv[0]);
-
- N_SETMAGIC(exec, OMAGIC, MID_MACHINE, 0);
- exec.a_text = ALIGN(data_len) + sizeof(data_len);
- exec.a_data = 0;
- exec.a_bss = 0;
- exec.a_syms = sizeof(nlist);
- exec.a_trsize = 0;
- exec.a_drsize = 0;
- lseek(1, (off_t)0, SEEK_SET);
- writex(1, &exec, sizeof(exec), argv[0]);
- exit(0);
-}
diff --git a/distrib/pc532/floppies/inst-common/dot.commonutils b/distrib/pc532/floppies/inst-common/dot.commonutils
deleted file mode 100644
index c3368d7ca6b..00000000000
--- a/distrib/pc532/floppies/inst-common/dot.commonutils
+++ /dev/null
@@ -1,137 +0,0 @@
-# $OpenBSD: dot.commonutils,v 1.8 2000/03/01 22:10:07 todd Exp $
-#
-# Copyright (c) 1994 Christopher G. Demetriou
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by Christopher G. Demetriou.
-# 4. The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-# Installation utilites (functions), to get NetBSD installed on
-# the hard disk. These are meant to be invoked from the shell prompt,
-# by people installing NetBSD.
-
-# we know that /etc/fstab is only generated on the hard drive
-dest_dir=/
-if [ ! -f /etc/fstab ]; then
- dest_dir=/mnt/
-fi
-
-# counter for possible shared library confusion
-TAR=/usr/bin/tar
-GUNZIP=/usr/bin/gunzip
-
-Set_tmp_dir()
-{
- def_tmp_dir=`pwd`
- if [ "$def_tmp_dir" = "/" -o "$def_tmp_dir" = "/mnt" ]; then
- def_tmp_dir="$dest_dir"usr/distrib
- fi
-
- echo -n "What directory should be used to find and/or store "
- echo "installtion"
- echo -n "files? [$def_tmp_dir] "
- read tmp_dir
- if [ "$tmp_dir" = "" ]; then
- tmp_dir=$def_tmp_dir
- fi
- if [ ! -d "$tmp_dir" ]; then
- /bin/rm -rf $tmp_dir
- mkdir -p $tmp_dir
- fi
-}
-
-Tmp_dir()
-{
- if [ "$tmp_dir" = "" ]; then
- Set_tmp_dir
- fi
- cd $tmp_dir
-}
-
-Load_fd()
-{
- Tmp_dir
- which=
- echo "Don't forget that you can't load from the drive you booted from."
- echo ""
-
- while [ "$which" != "0" -a "$which" != "1" ]; do
- echo -n "Read from which floppy drive ('0' or '1')? [1] "
- read which
- if [ "X$which" = "X" ]; then
- which=1
- fi
- done
- echo ""
- echo "WARNING: during the floppy loading process, you should only"
- echo "use Control-C at the prompt."
- echo ""
- while echo -n \
- "Insert floppy (hit Control-C to terminate, enter to load): "
- do
- read foo
- mount -r -t msdos /dev/fd${which}a /mnt2
- cp -rp /mnt2/* .
- umount /mnt2
- done
-}
-
-Load_tape()
-{
- Tmp_dir
- echo -n "Which tape drive will you be using? [rst0] "
- read which
- if [ "X$which" = "X" ]; then
- which=rst0
- fi
- echo -n "Insert the tape into the tape drive and hit return to "
- echo -n "continue..."
- read foo
- echo "Extracting files from the tape..."
- $TAR --unlink -xvpf /dev/$which
- echo "Done."
-}
-
-Extract()
-{
- Tmp_dir
- echo -n "Would you like to list the files as they're extracted? [n] "
- read verbose
- case $verbose in
- y*|Y*)
- tarverbose=v
- ;;
- *)
- tarverbose=
- ;;
- esac
- cat "$1"* | $GUNZIP | (cd $dest_dir ; $TAR --unlink -xp"$tarverbose"f - )
-}
-
-xd()
-{
- hexdump -e '"%6_ax " 4/1 "%02x " " " 4/1 "%02x " " " 4/1 "%02x " " " 4/1 "%02x " " "' -e '16/1 "%_p" "\n"' $*
-}
diff --git a/distrib/pc532/floppies/inst-common/download.c b/distrib/pc532/floppies/inst-common/download.c
deleted file mode 100644
index 0a0a347448d..00000000000
--- a/distrib/pc532/floppies/inst-common/download.c
+++ /dev/null
@@ -1,533 +0,0 @@
-/* $OpenBSD: download.c,v 1.4 2000/03/01 22:10:07 todd Exp $ */
-/* $NetBSD: download.c,v 1.1 1995/10/06 21:00:16 phil Exp $ */
-
-/*
- Hacked by Phil Nelson for use with NetBSD, 10/5/95.
- This source is in the public domain except for the makeraw function.
-
- The upload part of this program is taken from Bruce's ROM debugger
- code.
-
- For NetBSD, the usages are:
-
- download file
- - open "file" and ship it out standard output with the
- format expected by the pc532 ROM monitor download
- command.
-
- download -r nfile
- - standard input was generated by a "download file" command.
- Capture it, checking the CRC and store it in "nfile".
-
-
- Note: This program uses termios.
-
-Date: Tue, 27 Feb 90 11:47:38 pst
-From: Bruce Culbertson <culberts@hplwbc.hpl.hp.com>
-To: pc532@daver.bungi.com
-Subject: Re: ROM Debugger -- download command..
-
-John L. Connin <johnc%manatee%uunet@daver> writes:
-> Dave, what data format / protocol does the ROM debugger 'download' command
-> expect ??
-
-Here is the download program which I run at the other end of the
-serial line -- in my case, on an AT clone. The download protocol
-is explained in the comments in the program. I just recently added
-the download command to the monitor so let me know if you have
-problems with it or if you wish it worked differently.
-
-Bruce Culbertson
-----------------------------------------------------------------------
-*/
-/* MS-DOS Program for downloading to the NSC32000 Monitor. Use this as a
- * template for writing downloaders for other OS's. Compile the MS-DOS
- * version with the Microsoft C compiler.
- *
- * Bruce Culbertson 18 February 1990
- */
-
-/* Instructions for use:
- *
- * machine prompt, command, etc.
- * -------------------------------------------------------------------
- * 32000 Command (? for help): download <address>
- * MS-DOS [exit terminal emulator]
- * MS-DOS C> <this program> <file name to download>
- * MS-DOS [re-enter terminal emulator]
- * 32000 [hit return to get status of download]
- * 32000 Command (? for help): ...
- *
- * At any point you can send control-C (e.g. using your terminal emulator)
- * to the 32000 monitor to abort the download and return to the monitor
- * prompt.
- */
-
-/* Download protocol:
- *
- * <start mark> <length> <data> <CRC>
- *
- * Below, the sending machine is called SRC, receiving machine is DST.
- * Eight bit characters are used.
- *
- * Control-C (0x03) aborts the transfer. This capability is nice
- * to have if, for example, length is garbled and the DST expects
- * billions of characters. Since any byte of <length>, <data>,
- * or <CRC> could be control-C, we need to have a quote character.
- * I use ESC (0x1b). Thus, control-C and ESC are sent as
- * {0x1b 0x03} and {0x1b 0x1b}, respectively.
- *
- * Start mark:
- * This is a colon. When SRC begins sending, DST loops until it sees
- * the start mark. Thus, if spurious characters are sent as the
- * user switches from terminal emulator to download program on SRC,
- * DST can ignore them.
- *
- * Length:
- * Four bytes, least significant first. The length is number of
- * data bytes to be transfered, not including quote characters.
- * The two CRC bytes are also not included in the length.
- *
- * Data:
- * A byte is sent as a byte, with quoting if necessary.
- *
- * CRC:
- * Two bytes, least significant first. Use CCITT CRC generator
- * polynomial (x^16 + x^12 + x^5 + 1). Compute on data only (not
- * length or start) and exclude quotes. (This is the same CRC
- * as computed by Minix's CRC command.)
- */
-
-#include <stdio.h>
-#include <fcntl.h>
-
-#ifdef MSDOS
-
-# define OPEN_FLAGS (O_RDONLY | O_BINARY)
-# define off_t long
-# define DEFAULT_PORT 1
-long lseek();
-int port_num = DEFAULT_PORT;
-int port;
-
-#else
-
-# include <unistd.h>
-# define OPEN_FLAGS O_RDONLY
-
-#endif
-
-#define CCITT_GEN 0x11021 /* x^16 + x^12 + x^5 + 1 */
-#define BUFSZ 0x1000
-#define ESC 0x1b
-#define CTL_C 0x03
-#define START ':'
-
-char buf[BUFSZ];
-long write_data(), write_header();
-
-void putch ();
-
-void
-usage(name)
- char *name;
-{
- fprintf (stderr, "usage: %s [-r] <file>\n", name);
- exit (-1);
-}
-
-/* Output a character. If it is a CLT_C or ESC, then quote (preceed)
- * it with a ESC.
- */
-void
-write_ch (c)
-int c;
-{
- if (c == ESC || c == CTL_C)
- putch (ESC);
- putch (c);
-}
-
-/* Write two CRC bytes, LSB first.
- */
-void
-write_crc (crc)
-long crc;
-{
- write_ch ((int)((crc >> 0) & 0xff));
- write_ch ((int)((crc >> 8) & 0xff));
-}
-
-
-/* Given old CRC and new character, return new CRC. Uses standard
- * CCITT CRC generator polynomial.
- */
-unsigned long
-update_crc (crc, ch)
-long crc;
-int ch;
-{
- int i;
-
- for (i = 0x80; i; i >>= 1) {
- crc = (crc << 1) | (i & ch? 1: 0);
- if (crc & 0x10000) crc ^= CCITT_GEN;
- }
- return crc;
-}
-
-/* Write header. Format is a colon followed by four byte length,
- * LSB first. Length is the number of data bytes after quotes are
- * removed.
- */
-long
-write_header (fd)
-int fd;
-{
- long len;
-
- if (0 == (len = lseek (fd, (off_t)0, 2))) {
- fprintf (stderr, "file length is zero\n");
- exit (-1);
- }
- lseek (fd, (off_t)0, 0);
- write_ch (START);
- write_ch ((int)((len >> 0) & 0xff));
- write_ch ((int)((len >> 8) & 0xff));
- write_ch ((int)((len >> 16) & 0xff));
- write_ch ((int)((len >> 24) & 0xff));
- return len;
-}
-
-/* Write data.
- */
-long
-write_data (fd)
-int fd;
-{
- long len, crc = 0;
- char *p;
-
- for (;;) {
- len = read (fd, buf, BUFSZ);
- if (-1 == len) {
- fprintf (stderr, "read failed\n");
- exit (-1);
- }
- if (len == 0) break;
- for (p = buf; p < buf + len; ++p) {
- write_ch (*p);
- crc = update_crc (crc, *p);
- }
- }
- return crc;
-}
-
-
-#ifdef MSDOS
-/* Write hardware directly since BIOS and DOS are not reliable.
- */
-#define COM_WR 0
-#define COM_RD 0
-#define COM_IER 1
-#define COM_CTL 3
-#define COM_STAT 5
-#define COM_CTL_VAL 3 /* 8 bits, 1 stop, no parity */
-#define COM_IER_VAL 0 /* interrupts off */
-#define COM_TX_RDY 0x20
-
-int old_control, old_ier;
-
-/* Output a character to the serial port.
- */
-void
-putch (c)
-int c;
-{
- int stat;
-
- for (;;) {
- stat = inp (port + COM_STAT);
- if (stat & COM_TX_RDY) break;
- }
- outp (port + COM_WR, c);
-}
-
-/* Initialize serial port and save old values. Assume baud rate
- * already set.
- */
-init_port()
-{
- old_control = inp (port + COM_IER);
- old_ier = inp (port + COM_CTL);
- outp (port + COM_CTL, COM_CTL_VAL);
- outp (port + COM_IER, COM_IER_VAL);
-}
-
-/* Restore serial port to old configuration.
- */
-restore_port()
-{
- outp (port + COM_CTL, old_control);
- outp (port + COM_IER, old_ier);
-}
-
-#else
-
-/* dummy routines for Unix! */
-void
-putch (int c)
-{
- putchar (c);
-}
-
-#include <termios.h>
-
-struct termios oldstate;
-struct termios newstate;
-int atty;
-
-/* The following function is covered by: */
-
-/*-
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Make a pre-existing termios structure into "raw" mode: character-at-a-time
- * mode with no characters interpreted, 8-bit data path.
- */
-void
-makeraw(t)
- struct termios *t;
-{
- t->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
- t->c_oflag &= ~OPOST;
- t->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
- t->c_cflag &= ~(CSIZE|PARENB);
- t->c_cflag |= CS8;
-}
-
-/* End of copyrighted material. */
-
-void
-init_port(int fd)
-{
- atty = isatty(fd);
- if (atty) {
- tcgetattr (fd, &oldstate);
- newstate = oldstate;
- makeraw(&newstate);
- tcsetattr (fd, TCSANOW, &newstate);
- }
-}
-
-void
-restore_port(int fd)
-{
- if (atty) {
- tcsetattr (fd, TCSANOW, &oldstate);
- }
-}
-
-int
-get_int (val, len)
-unsigned long *val;
-long len;
-{
- unsigned char c;
- int shift = 0;
-
- *val = 0;
-
- while (len > 0) {
- c = getchar ();
- if (c == CTL_C) return 0; /* handle control-C */
- if (c == ESC) c = getchar (); /* handle quote */
- *val = *val + (c<<(8*shift++));
- --len;
- }
- return 1;
-}
-
-int
-get_file (f, len, crc)
-FILE *f;
-unsigned long len, *crc;
-{
- unsigned char c;
-
- while (len > 0) {
- c = getchar ();
- if (c == CTL_C) return 0; /* handle control-C */
- if (c == ESC) c = getchar (); /* handle quote */
- fputc(c,f);
- *crc = update_crc (*crc, c); /* compute crc, skip quote */
- --len;
- }
- return 1;
-}
-
-/* Upload end of the commands for Unix! */
-
-void
-upload (name)
-char *name;
-{
- unsigned long crc, adr, len;
- unsigned char c;
- unsigned long xcrc;
- FILE *f;
-
- /* Open the file. */
- f = fopen (name, "w");
- if (f == NULL) {
- printf ("Could not open \"%s\" for writing.\n", name);
- exit(1);
- }
-
- /* set raw mode for input. */
- init_port(0);
-
- /* get start character */
- for (;;) {
- c = getchar();
- if (c == START) break;
- if (c == CTL_C) return;
- }
-
- /* get len in little endian form */
- if (!get_int (&len, 4)) {
- fprintf (stderr, "Upload interrupted.\n");
- restore_port(0);
- exit(2);
- }
- crc = 0; /* crc on data only */
- if (!get_file (f, len, &crc)) { /* get data */
- fprintf (stderr, "Upload interrupted.\n");
- restore_port(0);
- exit(3);
- }
- /* get crc in little endian */
- if (!get_int (&xcrc, 2)) {
- fprintf (stderr, "Upload interrupted.\n");
- restore_port(0);
- exit(4);
- }
- if (crc == xcrc) /* print status */
- printf ("CRC ok, length = %d\n", len);
- else
- printf ("CRC error, received %d, expected %d, length %d\n",
- xcrc, crc, len);
-
- fclose (f);
-
- /* Restore tty parameters. */
- restore_port(0);
-}
-
-#endif
-
-
-/* Main program */
-int
-main (argc, argv)
- int argc;
- char **argv;
-{
- int fd;
- long crc, len;
-
-#ifdef MSDOS
- /* MSDOS argument processing */
- if (argc == 3) {
- if (1 != sscanf (argv[2], "%d", &port_num)) {
- fprintf (stderr, "Bad serial port, use 1 or 2\n");
- exit (-1);
- }
- --argc;
- }
- if (argc != 2) {
- fprintf (stderr, "usage: %s <file> [<serial port>]\n", argv[0]);
- exit (-1);
- }
- if (port_num == 1) port = 0x3f8;
- else if (port_num == 2) port = 0x2f8;
- else {
- fprintf (stderr, "Bad serial port, use 1 or 2\n");
- exit (-1);
- }
-
-#else
-
- int do_receive = 0;
- int ch;
- extern int optind;
-
- /* Unix argument processing */
- while ((ch = getopt(argc, argv, "r")) != -1) {
- switch (ch) {
-
- case 'r': /* Receive end of a download, use "upload()". */
- do_receive = 1;
- break;
-
- case '?':
- default:
- usage(argv[0]);
- return (1);
- }
- }
-
- if (argc-1 != optind)
- usage(argv[0]);
-
- if (do_receive) {
- upload (argv[2]);
- exit (0);
- }
-
-#endif
-
- if (0 > (fd = open (argv[1], OPEN_FLAGS))) {
- fprintf (stderr, "can not open \"%s\" for reading\n", argv[1]);
- exit (-1);
- }
-
- init_port(1);
- len = write_header (fd);
- crc = write_data (fd);
- write_crc (crc);
- printf ("Length=%ld CRC=%ld\n", len, crc);
- restore_port(1);
- exit (0);
-}
diff --git a/distrib/pc532/floppies/inst-common/go.c b/distrib/pc532/floppies/inst-common/go.c
deleted file mode 100644
index 529f5b64b0c..00000000000
--- a/distrib/pc532/floppies/inst-common/go.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* $OpenBSD: go.c,v 1.4 2000/03/01 22:10:07 todd Exp $ */
-/*
- * Copyright (c) 1995 Matthias Pfaller.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Matthias Pfaller.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#include <sys/reboot.h>
-register r6 asm("r6");
-
-/*
- * In order to install netbsd on 4mb machines, netbsd must survive an overflow
- * of the real kernel into the netbsd image. So the compressed kernel image
- * has to be linked in front of the uncompressing code. This code fragment
- * sets the default root disk to rd0 and then jumps behind the compressed
- * kernel image.
- */
-
-go()
-{
- extern begin() asm("begin");
- /* One more place that knows that rd is at major 3 ... */
- r6 = MAKEBOOTDEV(3, 0, 0, 0, 0);
- begin();
-}
diff --git a/distrib/pc532/floppies/inst-common/inject.c b/distrib/pc532/floppies/inst-common/inject.c
deleted file mode 100644
index 3976f6f54cc..00000000000
--- a/distrib/pc532/floppies/inst-common/inject.c
+++ /dev/null
@@ -1,124 +0,0 @@
-/* $OpenBSD: inject.c,v 1.4 2000/03/01 22:10:07 todd Exp $ */
-/*
- * Copyright (c) 1995 Matthias Pfaller.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Matthias Pfaller.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-#include <bm.h>
-
-/*
- * Map a file
- */
-
-void *map(char *file, int mode, int *len)
-{
- int fd;
- struct stat sb;
- void *p;
-
- /* Open the file we'd like map */
- fd = open(file, mode);
- if (fd < 0) {
- perror(file);
- exit(1);
- }
-
- /* Get the length of the file */
- if (fstat(fd, &sb) < 0) {
- perror("fstat");
- exit(1);
- }
-
- /* Return the length of file in len */
- *len = sb.st_size;
-
- /* Now map the file */
- p = mmap(NULL, *len, PROT_READ | (mode == O_RDWR ? PROT_WRITE : 0),
- MAP_SHARED, fd, 0);
- if (p == NULL) {
- perror("mmap");
- exit(1);
- }
-
- /*
- * We will access this mostly sequential.
- * So let's tell it to the vm system.
- */
- madvise(p, *len, MADV_SEQUENTIAL);
- close(fd);
- return(p);
-}
-
-main(int argc, char **argv)
-{
- void *kern, *filesys, *ramdisk;
- int kernlen, filesyslen;
- bm_pat *bm;
- static char pattern[] = "Ramdiskorigin";
-
- if (argc != 3) {
- fprintf(stderr, "usage: %s kernel filesystem", argv[0]);
- exit(1);
- }
-
- /* Map the kernel image read/write */
- kern = map(argv[1], O_RDWR, &kernlen);
-
- /* Map the filesystem image read only */
- filesys = map(argv[2], O_RDONLY, &filesyslen);
-
- /* Search the kernel image for the ramdisk signature */
- bm = bm_comp(pattern, sizeof(pattern), NULL);
- ramdisk = bm_exec(bm, kern, kernlen);
- if (!ramdisk) {
- fprintf(stderr, "Origin of ramdisk not found in kernel\n");
- exit(1);
- }
-
- /* Does the filesystem image fit into the kernel image? */
- if ((kernlen - (ramdisk - kern)) < filesyslen) {
- fprintf(stderr, "Kernel image to small\n");
- exit(1);
- }
-
- /* Copy the filesystem image into the kernel image */
- memcpy(ramdisk, filesys, filesyslen);
-
- /* Sync vm/fs and unmap the images */
- msync(kern, kernlen, 0);
- munmap(kern, kernlen);
- munmap(filesys, filesyslen);
- exit(0);
-}
diff --git a/distrib/pc532/floppies/inst-common/instbin.conf b/distrib/pc532/floppies/inst-common/instbin.conf
deleted file mode 100644
index 160d535dc00..00000000000
--- a/distrib/pc532/floppies/inst-common/instbin.conf
+++ /dev/null
@@ -1,43 +0,0 @@
-# $OpenBSD: instbin.conf,v 1.7 2000/06/09 17:42:54 mickey Exp $
-#
-# kcbin.conf - unified binary for the kc floppy
-#
-
-srcdirs bin sbin usr.bin usr.sbin gnu/usr.bin games distrib/pc532/floppies
-
-progs chat download less pppstats vi
-progs basename bc bim cat chmod chroot cp
-progs date dd df dirname disklabel dmesg domainname dump
-progs expr factor find fsck_ffs ftp
-progs gzip hostname hexdump ifconfig init
-progs kill kvm_mkdb ln ls mkdir mknod
-progs mount mount_cd9660 mount_ffs mount_msdos mount_nfs mt mv netstat newfs
-progs ping pppd ps pwd rcp reboot restore rm rmdir route
-progs sed sh slattach strings stty swapon sync sysctl
-progs tar test tip traceroute umount update
-
-special chat srcdir usr.sbin/pppd/chat
-special download srcdir distrib/pc532/floppies/inst-common
-special download objs download.o
-special pppstats srcdir usr.sbin/pppd/pppstats
-special less srcdir usr.bin/less/less
-special vi srcdir usr.bin/vi/build
-
-ln fsck_ffs fsck
-ln less more
-ln chmod chgrp
-ln chmod chown
-ln dump rdump
-ln gzip gzcat gunzip
-ln sh -sh # init invokes the shell this way
-ln test [
-ln mount_cd9660 cd9660
-ln mount_ffs ffs
-ln mount_msdos msdos
-ln mount_nfs nfs
-ln restore rrestore
-ln vi ex
-ln vi view
-ln reboot halt
-
-libs -lkvm -ledit -lcurses -lutil -ltermcap -lcrypt -ll -lm
diff --git a/distrib/pc532/floppies/inst-common/list b/distrib/pc532/floppies/inst-common/list
deleted file mode 100644
index 1f75f7f3b86..00000000000
--- a/distrib/pc532/floppies/inst-common/list
+++ /dev/null
@@ -1,108 +0,0 @@
-# $OpenBSD: list,v 1.8 2000/06/09 17:42:54 mickey Exp $
-
-# copy the MAKEDEV script and make some devices
-COPY ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV
-SPECIAL cd dev; sh MAKEDEV floppy
-SPECIAL /bin/rm dev/MAKEDEV
-
-# we need the contents of /usr/mdec (XXX)
-COPY ${DESTDIR}/usr/mdec/* usr/mdec
-
-# various files that we need in /etc for the install
-COPY ${TOPDIR}/../../../etc/group etc
-COPY ${TOPDIR}/../../../etc/master.passwd etc
-COPY ${TOPDIR}/../../../etc/protocols etc
-COPY ${TOPDIR}/../../../etc/services etc
-SPECIAL >etc/ppp/options
-COPY ${OBJDIR}/pwd_mkdb pwd_mkdb
-SPECIAL /usr/sbin/chroot . ./pwd_mkdb -p /etc/master.passwd
-SPECIAL /bin/rm pwd_mkdb
-
-# copy the crunched binary, link to it
-COPY ${OBJDIR}/netbsd.gz netbsd.gz
-COPY ${OBJDIR}/instbin instbin
-LINK instbin bin/cat
-LINK instbin bin/chmod
-LINK instbin bin/chgrp
-LINK instbin bin/cp
-LINK instbin bin/date
-LINK instbin bin/dd
-LINK instbin bin/df
-LINK instbin bin/domainname
-LINK instbin bin/expr
-LINK instbin bin/hostname
-LINK instbin bin/kill
-LINK instbin bin/ln
-LINK instbin bin/ls
-LINK instbin bin/mkdir
-LINK instbin bin/mt
-LINK instbin bin/mv
-LINK instbin bin/ps
-LINK instbin bin/pwd
-LINK instbin bin/rcp
-LINK instbin bin/rm
-LINK instbin bin/rmdir
-LINK instbin bin/sh
-LINK instbin bin/stty
-LINK instbin bin/sync
-LINK instbin bin/test
-LINK instbin bin/[
-LINK instbin sbin/bim
-LINK instbin sbin/chown
-LINK instbin sbin/disklabel
-LINK instbin sbin/dmesg
-LINK instbin sbin/dump
-LINK instbin sbin/fsck
-LINK instbin sbin/halt
-LINK instbin sbin/ifconfig
-LINK instbin sbin/init
-LINK instbin sbin/mknod
-LINK instbin sbin/mount
-LINK instbin sbin/mount_cd9660
-LINK instbin sbin/mount_ffs
-LINK instbin sbin/mount_msdos
-LINK instbin sbin/mount_nfs
-LINK instbin sbin/newfs
-LINK instbin sbin/ping
-LINK instbin sbin/rdump
-LINK instbin sbin/reboot
-LINK instbin sbin/restore
-LINK instbin sbin/route
-LINK instbin sbin/rrestore
-LINK instbin sbin/slattach
-LINK instbin sbin/swapon
-LINK instbin sbin/umount
-SYMLINK /instbin usr/bin/basename
-SYMLINK /instbin usr/bin/dirname
-SYMLINK /instbin usr/bin/hexdump
-SYMLINK /instbin usr/bin/ex
-SYMLINK /instbin usr/bin/find
-SYMLINK /instbin usr/bin/ftp
-SYMLINK /instbin usr/bin/gunzip
-SYMLINK /instbin usr/bin/gzcat
-SYMLINK /instbin usr/bin/gzip
-SYMLINK /instbin usr/bin/more
-SYMLINK /instbin usr/bin/less
-SYMLINK /instbin usr/bin/netstat
-SYMLINK /instbin usr/bin/sed
-SYMLINK /instbin usr/bin/strings
-SYMLINK /instbin usr/bin/tar
-SYMLINK /instbin usr/bin/tip
-SYMLINK /instbin usr/bin/vi
-SYMLINK /instbin usr/bin/view
-SYMLINK /instbin usr/games/factor
-SYMLINK /instbin usr/sbin/chat
-SYMLINK /instbin usr/sbin/chroot
-SYMLINK /instbin usr/sbin/kvm_mkdb
-SYMLINK /instbin usr/sbin/pppd
-SYMLINK /instbin usr/sbin/pppstats
-SYMLINK /instbin usr/sbin/sysctl
-SYMLINK /instbin usr/sbin/traceroute
-SYMLINK /instbin usr/sbin/update
-SYMLINK /instbin usr/local/bin/download
-
-#SPECIAL /bin/rm instbin
-
-# and the common installation tools
-COPY ${TOPDIR}/inst-common/dot.commonutils .commonutils
-COPY ${TOPDIR}/inst-common/termcap.vt100 usr/share/misc/termcap
diff --git a/distrib/pc532/floppies/inst-common/memory_map b/distrib/pc532/floppies/inst-common/memory_map
deleted file mode 100644
index 2017799dfd7..00000000000
--- a/distrib/pc532/floppies/inst-common/memory_map
+++ /dev/null
@@ -1,5 +0,0 @@
-0x400000 Top of physical RAM for 4mb machine
-0x3EB800 Start of boot code
-0x288000 Start of ramdisk when booting from rd0
-0x240000 Start of netbsd image (may overflow into rd0 image)
-0x002000 Start of kernel (may overflow into netbsd image)
diff --git a/distrib/pc532/floppies/inst-common/mtree.conf b/distrib/pc532/floppies/inst-common/mtree.conf
deleted file mode 100644
index d7164d58d76..00000000000
--- a/distrib/pc532/floppies/inst-common/mtree.conf
+++ /dev/null
@@ -1,123 +0,0 @@
-# $OpenBSD: mtree.conf,v 1.4 2000/03/01 22:10:07 todd Exp $
-
-/set type=dir uname=root gname=wheel mode=0755
-# .
-.
-
-# ./bin
-bin
-# ./bin
-..
-
-# ./dev
-dev
-# ./dev
-..
-
-# ./etc
-etc
-
-# ./etc/ppp
-ppp
-# ./etc/ppp
-..
-
-# ./etc
-..
-
-# ./mnt
-mnt
-# ./mnt
-..
-
-# ./mnt2
-mnt2
-# ./mnt2
-..
-
-# ./sbin
-sbin
-# ./sbin
-..
-
-# ./tmp
-tmp
-# ./tmp
-..
-
-# ./var
-var
-
-# ,/var/run
-run
-# ./var/run
-..
-
-# ,/var/db
-db
-# ./var/db
-..
-
-# ./var/tmp
-tmp
-
-# ./var/tmp/vi.recover
-vi.recover
-# ./var/tmp/vi.recover
-..
-
-# ./var/tmp
-..
-
-# ./var
-..
-
-# ./usr
-usr
-
-# ./usr/bin
-bin
-# ./usr/bin
-..
-
-# ./usr/games
-games
-# ./usr/games
-..
-
-
-# ./usr/mdec
-mdec
-# ./usr/mdec
-..
-
-# ./usr/sbin
-sbin
-# ./usr/sbin
-..
-
-# ./usr/share
-share
-
-# ./usr/share/misc
-misc
-# ./usr/share/misc
-..
-
-# ./usr/share
-..
-
-# ./usr/local
-local
-
-# ./usr/local/bin
-bin
-
-# ./usr/local/bin
-..
-
-# ./usr/local
-..
-
-# ./usr
-..
diff --git a/distrib/pc532/floppies/inst-common/termcap.vt100 b/distrib/pc532/floppies/inst-common/termcap.vt100
deleted file mode 100644
index 4710fb55d15..00000000000
--- a/distrib/pc532/floppies/inst-common/termcap.vt100
+++ /dev/null
@@ -1,16 +0,0 @@
-vt_keys:\
- :Pu=\E[A!\EOA:Pd=\E[B!\EOB:Pr=\E[C!\EOC:Pl=\E[D!\EOD:\
- :P0=\EOp!\E[3~:P1=\EOq!\E[12~:P2=\EOr!\E[20~:P3=\EOs!\E[13~:\
- :P4=\EOt!\E[11~:P5=\EOu!\E[21~:P6=\EOv!\E[14~:P7=\EOw!\E[15~:\
- :P8=\EOx!\E[5~:P9=\EOy!\E[24~:PE=\EOM:PD=\EOn!\E[2~:\
- :PL=\EOP!\E[4~!\E[H:PR=\EOQ!\E[6~:PS=\EOR!\E[23~:\
- :PX=\EOS!\E[18~!\E[1~:PM=\EOm!\E[19~:PP=\EOl!\E[17~:
-
-vt100|xterm:\
- :AL=\E[%dL:DL=\E[%dM:al=\E[L:bs:cd=\E[J:ce=\E[K:cl=\E[H\E[J:\
- :cm=\E[%i%d;%dH:co#80:cs=\E[%i%r%d;%dr:dc=\E[P:dl=\E[M:do=^J:\
- :ei=:ic=\E[@:im=:k0=\EOY:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:\
- :k5=\EOT:k6=\EOU:k7=\EOV:k8=\EOW:k9=\EOX:kb=^H:kd=\EOB:\
- :ke=\E[?1l\E>:kl=\EOD:kr=\EOC:ks=\E[?1h\E=:ku=\EOA:li#24:\
- :nd=\E[C:pt:rs=\E[?5l:se=\E[m:so=\E[7m:sr=\EM:te=\E>:ti=\E=:\
- :up=\E[A:xn:tc=vt_keys:
diff --git a/distrib/pc532/floppies/inst/Makefile b/distrib/pc532/floppies/inst/Makefile
deleted file mode 100644
index 180c1e83c93..00000000000
--- a/distrib/pc532/floppies/inst/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# $OpenBSD: Makefile,v 1.3 2000/03/01 22:10:06 todd Exp $
-
-TOP= ${.CURDIR}/..
-
-.include "${TOP}/Makefile.inc"
-IMAGE= inst-${REV}.fs
-
-.include "${TOP}/inst-common/Makefile.inc"
diff --git a/distrib/pc532/floppies/inst/disktab.preinstall b/distrib/pc532/floppies/inst/disktab.preinstall
deleted file mode 100644
index 0b16c864552..00000000000
--- a/distrib/pc532/floppies/inst/disktab.preinstall
+++ /dev/null
@@ -1,31 +0,0 @@
-# $OpenBSD: disktab.preinstall,v 1.2 2000/03/01 22:10:06 todd Exp $
-
-# Disk geometry and partition layout tables.
-# Key:
-# dt controller type
-# ty type of disk (fixed, removeable, simulated)
-# d[0-4] drive-type-dependent parameters
-# ns #sectors/track
-# nt #tracks/cylinder
-# nc #cylinders/disk
-# sc #sectors/cylinder, nc*nt default
-# su #sectors/unit, sc*nc default
-# se sector size, DEV_BSIZE default
-# rm rpm, 3600 default
-# sf supports bad144-style bad sector forwarding
-# sk sector skew per track, default 0
-# cs sector skew per cylinder, default 0
-# hs headswitch time, default 0
-# ts one-cylinder seek time, default 0
-# il sector interleave (n:1), 1 default
-# bs boot block size, default BBSIZE
-# sb superblock size, default SBSIZE
-# o[a-h] partition offsets in sectors
-# p[a-h] partition sizes in sectors
-# b[a-h] partition block sizes in bytes
-# f[a-h] partition fragment sizes in bytes
-# t[a-h] partition types (filesystem, swap, etc)
-#
-# All partition sizes reserve space for bad sector tables.
-# (5 cylinders needed for maintenance + replacement sectors)
-#
diff --git a/distrib/pc532/floppies/inst/dot.hdprofile b/distrib/pc532/floppies/inst/dot.hdprofile
deleted file mode 100644
index 7d82f05fc94..00000000000
--- a/distrib/pc532/floppies/inst/dot.hdprofile
+++ /dev/null
@@ -1,62 +0,0 @@
-# $OpenBSD: dot.hdprofile,v 1.4 2000/03/01 22:10:06 todd Exp $
-#
-# Copyright (c) 1994 Christopher G. Demetriou
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by Christopher G. Demetriou.
-# 4. The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/games:/
-export PATH
-TERM=vt100
-export TERM
-
-umask 022
-
-if [ "X${DONEPROFILE}" = "X" ]; then
- DONEPROFILE=YES
-
- echo "Checking filesystems..."
- fsck -y
-
- echo "Mounting filesystems..."
- mount -a
-
- # set up some sane defaults
- echo 'erase ^?, werase ^W, kill ^U, intr ^C'
- stty newcrt werase ^W intr ^C kill ^U erase ^?
- echo ''
-
- # run update, so that installed software is written as it goes.
- update
-
- # pull in the functions that people will use from the shell prompt.
- . /.commonutils
- . /.instutils
-
- echo "Follow the installation directions to install the NetBSD"
- echo "distribution sets."
-fi
diff --git a/distrib/pc532/floppies/inst/dot.instutils b/distrib/pc532/floppies/inst/dot.instutils
deleted file mode 100644
index c550b803dcf..00000000000
--- a/distrib/pc532/floppies/inst/dot.instutils
+++ /dev/null
@@ -1,157 +0,0 @@
-# $OpenBSD: dot.instutils,v 1.4 2000/03/01 22:10:06 todd Exp $
-#
-# Copyright (c) 1994 Christopher G. Demetriou
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by Christopher G. Demetriou.
-# 4. The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-# Installation configuration utilites (functions), to get NetBSD configured
-# reasonably once it is installed on the hard disk. These are meant to be
-# invoked from the shell prompt, by people installing NetBSD.
-
-Configure()
-{
- DEV=/dev
- ETC=/etc
- if [ ! -f /etc/fstab ]; then
- DEV=/mnt/dev
- ETC=/mnt/etc
- fi
-
- echo "You will now be prompted for information about this"
- echo "machine. If you hit return, the default answer (in"
- echo "brackets) will be used."
-
- echo ""
- echo -n "What is this machine's hostname? [unknown.host.domain] "
- read hname
- if [ "$hname" = "" ]; then
- hname=unknown.host.domain
- fi
- echo $hname > ${ETC}/myname
- proto_domain=`echo $hname | sed -e 's/[^.]*\.//'`
-
- echo ""
- echo "What domain is this machine in (this is NOT its YP"
- echo -n "domain name)? [$proto_domain] "
- read dname
- if [ "$dname" = "" ]; then
- dname=$proto_domain
- fi
-
- echo ""
- if [ -e $ETC/sendmail.cf ]; then
- echo "WARNING: A default sendmail.cf exists, and probably"
- echo "needs to be tuned and/or replaced, to work properly at"
- echo "your site!"
- else
- echo "WARNING: No default sendmail.cf installed. Did you"
- echo "forget to install the 'etc' distribution?"
- fi
-
- echo "127.0.0.1 localhost localhost.$dname" > ${ETC}/hosts
-
- echo ""
- echo -n "Does this machine have an ethernet interface? [y] "
- read resp
- case "$resp" in
- n*)
- ;;
- *)
- intf=
- while [ "$intf" = "" ]; do
- echo -n "What is the primary interface name "
- echo -n "(e.g. ed0, ep0, etc)? "
- read intf
- done
- echo -n "What is the hostname for this interface? [$hname] "
- read ifname
- if [ "$ifname" = "" ]; then
- ifname=$hname
- fi
- ifaddr=
- while [ "$ifaddr" = "" ]; do
- echo -n "What is the IP address associated with "
- echo -n "interface ${intf}? "
- read ifaddr
- done
- echo "$ifaddr $ifname `echo $ifname | sed -e s/\.$dname//`" \
- >> ${ETC}/hosts
-
- echo -n "Does this interface have a special netmask? [n] "
- read resp
- case "$resp" in
- y*)
- echo -n "What is the netmask? [0xffffff00] "
- read ifnetmask
- if [ "$ifnetmask" = "" ]; then
- ifnetmask=0xffffff00
- fi
- ;;
- *)
- ifnetmask=
- ;;
- esac
-
- echo -n "Does this interface need additional flags? [n] "
- read resp
- case "$resp" in
- y*)
- echo -n "What flags? [link0] "
- read ifflags
- if [ "$ifflags" = "" ]; then
- ifflags=link0
- fi
- ;;
- *)
- ifflags=
- ;;
- esac
- echo "inet $ifname $ifnetmask $ifflags" > ${ETC}/hostname.$intf
-
- echo ""
- echo -n "WARNING: if you have any more ethernet interfaces, "
- echo "you will have to configure"
- echo -n "them by hand. Read the comments in /etc/netstart to "
- echo "learn how to do this."
- ;;
- esac
-
- echo ""
- echo -n "Making device nodes (may take a while)..."
- cd ${DEV}
- sh MAKEDEV all
- echo " done."
-
- sync
-
- echo ""
- echo "If you haven't already installed a kernel on the hard drive"
- echo "using your kernel-copy floppy, do so now. Kernel"
- echo "installation instructions can be found in the"
- echo "installation notes."
-}
diff --git a/distrib/pc532/floppies/inst/dot.profile b/distrib/pc532/floppies/inst/dot.profile
deleted file mode 100644
index 257731800d3..00000000000
--- a/distrib/pc532/floppies/inst/dot.profile
+++ /dev/null
@@ -1,57 +0,0 @@
-# $OpenBSD: dot.profile,v 1.5 2000/10/25 16:38:13 millert Exp $
-#
-# Copyright (c) 1994 Christopher G. Demetriou
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by Christopher G. Demetriou.
-# 4. The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-export PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/games:/
-export HISTFILE=/.sh_history
-export TERM=vt100
-
-umask 022
-
-set -o emacs # emacs-style command line editing
-
-if [ "X${DONEPROFILE}" = "X" ]; then
- DONEPROFILE=YES
-
- # set up some sane defaults
- echo 'erase ^?, werase ^W, kill ^U, intr ^C, status ^T'
- stty werase ^W intr ^C kill ^U erase ^? status ^T
- echo ''
-
- # run update, so that installed software is written as it goes.
- update
-
- # pull in the functions that people will use from the shell prompt.
- . /.commonutils
- . /.instutils
-
- # run the installation script.
- install
-fi
diff --git a/distrib/pc532/floppies/inst/install.sh b/distrib/pc532/floppies/inst/install.sh
deleted file mode 100644
index 3956c4b33fb..00000000000
--- a/distrib/pc532/floppies/inst/install.sh
+++ /dev/null
@@ -1,476 +0,0 @@
-#!/bin/sh
-# $OpenBSD: install.sh,v 1.9 2000/03/01 22:10:06 todd Exp $
-#
-# Copyright (c) 1994 Christopher G. Demetriou
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by Christopher G. Demetriou.
-# 4. The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-# NetBSD installation script.
-# In a perfect world, this would be a nice C program, with a reasonable
-# user interface.
-
-DT=/etc/disktab # /etc/disktab
-FSTABDIR=/mnt/etc # /mnt/etc
-#DONTDOIT=echo
-
-VERSION=1.0
-FSTAB=${FSTABDIR}/fstab
-
-getresp() {
- read resp
- if [ "X$resp" = "X" ]; then
- resp=$1
- fi
-}
-
-echo "Welcome to the NetBSD ${VERSION} installation program."
-echo ""
-echo "This program is designed to help you put NetBSD on your hard disk,"
-echo "in a simple and rational way. You'll be asked several questions,"
-echo "and it would probably be useful to have your disk's hardware"
-echo "manual, the installation notes, and a calculator handy."
-echo ""
-echo "In particular, you will need to know some reasonably detailed"
-echo "information about your disk's geometry, because there is currently"
-echo "no way this this program can figure that information out."
-echo ""
-echo "As with anything which modifies your hard drive's contents, this"
-echo "program can cause SIGNIFICANT data loss, and you are advised"
-echo "to make sure your hard drive is backed up before beginning the"
-echo "installation process."
-echo ""
-echo "Default answers are displyed in brackets after the questions."
-echo "You can hit Control-C at any time to quit, but if you do so at a"
-echo "prompt, you may have to hit return. Also, quitting in the middle of"
-echo "installation may leave your system in an inconsistent state."
-echo ""
-echo -n "Proceed with installation? [n] "
-getresp "n"
-case "$resp" in
- y*|Y*)
- echo "Cool! Let's get to it..."
- ;;
- *)
- echo ""
- echo "OK, then. Enter 'halt' at the prompt to halt the"
- echo "machine. Once the machine has halted, remove the"
- echo "floppy and press any key to reboot."
- exit
- ;;
-esac
-
-echo ""
-echo "To do the installation, you'll need to provide some information about"
-echo "your disk."
-echo ""
-drivetype=sd
-sect_fwd=""
-type=SCSI
-
-# find out what units are possible for that disk, and query the user.
-driveunits=`ls /dev/${drivetype}?a | sed -e 's,/dev/\(...\)a,\1,g'`
-if [ "X${driveunits}" = "X" ]; then
- echo "FATAL ERROR:"
- echo "No devices for disks of type '${drivetype}'."
- echo "This is probably a bug in the install disks."
- echo "Exiting install program."
- exit
-fi
-prefdrive=${drivetype}0
-
-echo ""
-echo "The following ${drivetype}-type disks are supported by this"
-echo "installation procedure:"
-echo " "${driveunits}
-echo "Note that they may not exist in _your_ machine; the list of"
-echo "disks in your machine was printed when the system was booting."
-echo ""
-while [ "X${drivename}" = "X" ]; do
- echo -n "Which disk would like to install on? [${prefdrive}] "
- getresp ${prefdrive}
- otherdrives=`echo "${driveunits}" | sed -e s,${resp},,`
- if [ "X${driveunits}" = "X${otherdrives}" ]; then
- echo ""
- echo "\"${resp}\" is an invalid drive name. Valid choices"
- echo "are: "${driveunits}
- echo ""
- else
- drivename=${resp}
- fi
-done
-
-echo ""
-echo "Using disk ${drivename}."
-echo ""
-echo -n "What kind of disk is it? (one word please) [my${drivetype}] "
-getresp "my${drivetype}"
-labelname=$resp
-
-echo ""
-echo "You will now need to provide some information about your disk's"
-echo "geometry. This should either be in the User's Manual for your disk,"
-echo "or you should have written down what NetBSD printed when booting."
-echo "(Note that he geometry that's printed at boot time is preferred.)"
-echo ""
-echo -n "Number of bytes per disk sector? [512] "
-getresp 512
-bytes_per_sect="$resp"
-
-echo -n "Number of disk cylinders? "
-getresp
-cyls_per_disk="$resp"
-
-echo -n "Number of disk tracks (heads) per disk cylinder? "
-getresp
-tracks_per_cyl="$resp"
-
-echo -n "Number of disk sectors per disk track? "
-getresp
-sects_per_track="$resp"
-
-cylindersize=`expr $sects_per_track \* $tracks_per_cyl`
-cylbytes=`expr $cylindersize \* $bytes_per_sect`
-disksize=`expr $cylindersize \* $cyls_per_disk`
-
-echo ""
-echo "Your disk has a total of $disksize $bytes_per_sect byte sectors,"
-echo "arranged as $cyls_per_disk cylinders which contain $cylindersize "
-echo "sectors ($cylbytes bytes) each."
-echo ""
-echo "You can specify partition sizes in cylinders ('c') or sectors ('s')."
-while [ "X${sizemult}" = "X" ]; do
- echo -n "What units would you like to use? [cylinders] "
- getresp cylinders
- case "$resp" in
- c*|C*)
- sizemult=$cylindersize
- sizeunit="cylinders"
- ;;
- s*|S*)
- sizemult=1
- sizeunit="sectors"
- ;;
- *)
- echo ""
- echo "Enter cylinders ('c') or sectors ('s')."
- ;;
- esac
-done
-
-if [ $sizeunit = "sectors" ]; then
- echo ""
- echo "For best disk performance, partitions should begin and end on"
- echo "cylinder boundaries. Wherever possible, pick sizes that are"
- echo "multiples of the cylinder size ($cylindersize sectors)."
-fi
-
-partition=`expr $disksize / $sizemult`
-partition_sects=`expr $partition \* $sizemult`
-part_offset=0
-badspacesec=0
-if [ "$sect_fwd" = "sf:" ]; then
- badspacecyl=`expr $sects_per_track + 126`
- badspacecyl=`expr $badspacecyl + $cylindersize - 1`
- badspacecyl=`expr $badspacecyl / $cylindersize`
- badspacesec=`expr $badspacecyl \* $cylindersize`
- echo ""
- echo -n "Using $badspacesec sectors ($badspacecyl cylinders) for the "
- echo "bad144 bad block table"
-fi
-
-sects_left=`expr $partition_sects - $badspacesec`
-units_left=`expr $sects_left / $sizemult`
-echo ""
-echo "There are $units_left $sizeunit left to allocate."
-echo ""
-root=0
-while [ $root -eq 0 ]; do
- echo -n "Root partition size (in $sizeunit)? "
- getresp
- case $resp in
- [1-9]*)
- total=$resp
- if [ $total -gt $units_left ]; then
- echo -n "Root size is greater than remaining "
- echo "free space on disk."
- else
- root=$resp
- fi
- ;;
- esac
-done
-root_offset=$part_offset
-part_used=`expr $root + $badspacesec / $sizemult`
-units_left=`expr $partition - $part_used`
-echo ""
-
-swap=0
-while [ $swap -eq 0 ]; do
- echo "$units_left $sizeunit remaining in NetBSD portion of disk."
- echo -n "Swap partition size (in $sizeunit)? "
- getresp
- case $resp in
- [1-9]*)
- if [ $swap -gt $units_left ]; then
- echo -n "Swap size is greater than remaining "
- echo "free space on disk."
- else
- swap=$resp
- fi
- ;;
- esac
-done
-swap_offset=`expr $root_offset + $root`
-part_used=`expr $part_used + $swap`
-units_left=`expr $partition - $part_used`
-echo ""
-
-boot=0
-while [ $boot -eq 0 ]; do
- echo "$units_left $sizeunit remaining in NetBSD portion of disk."
- echo -n "Boot partition size (in $sizeunit)? "
- getresp
- case $resp in
- [1-9]*)
- if [ $boot -gt $units_left ]; then
- echo -n "Boot size is greater than remaining "
- echo "free space on disk."
- else
- boot=$resp
- fi
- ;;
- esac
-done
-boot_offset=`expr $root_offset + $root + $swap + $units_left - $boot`
-part_used=`expr $part_used + $boot`
-echo ""
-
-fragsize=1024
-blocksize=8192
-$DONTDOIT mount -u /dev/rd0 /
-cat /etc/disktab.preinstall > $DT
-echo "" >> $DT
-echo "$labelname|NetBSD installation generated:\\" >> $DT
-echo " :dt=${type}:ty=winchester:\\" >> $DT
-echo -n " :nc#${cyls_per_disk}:ns#${sects_per_track}" >> $DT
-echo ":nt#${tracks_per_cyl}:\\" >> $DT
-echo " :se#${bytes_per_sect}:${sect_fwd}\\" >> $DT
-_size=`expr $root \* $sizemult`
-_offset=`expr $root_offset \* $sizemult`
-echo -n " :pa#${_size}:oa#${_offset}" >> $DT
-echo ":ta=4.2BSD:ba#${blocksize}:fa#${fragsize}:\\" >> $DT
-_size=`expr $swap \* $sizemult`
-_offset=`expr $swap_offset \* $sizemult`
-echo " :pb#${_size}:ob#${_offset}:tb=swap:\\" >> $DT
-_size=`expr $partition \* $sizemult`
-_offset=`expr $part_offset \* $sizemult`
-echo " :pc#${_size}:oc#${_offset}:\\" >> $DT
-_size=`expr $boot \* $sizemult`
-_offset=`expr $boot_offset \* $sizemult`
-echo " :ph#${_size}:oh#${_offset}:th=boot:\\" >> $DT
-
-echo "You will now have to enter information about any other partitions"
-echo "to be created in the NetBSD portion of the disk. This process will"
-echo "be complete when you've filled up all remaining space in the NetBSD"
-echo "portion of the disk."
-
-while [ $part_used -lt $partition ]; do
- part_size=0
- units_left=`expr $partition - $part_used`
- while [ $part_size -eq 0 ]; do
- echo ""
- echo -n "$units_left $sizeunit remaining in NetBSD portion of "
- echo "the disk"
- echo -n "Next partition size (in $sizeunit)? "
- getresp
- case $resp in
- [1-9]*)
- total=`expr $part_used + $resp`
- if [ $total -gt $partition ]; then
- echo -n "That would make the partition"
- echo "too large to fit!"
- else
- part_size=$resp
- part_used=$total
- part_name=""
- while [ "$part_name" = "" ]; do
- echo -n "Mount point? "
- getresp
- part_name=$resp
- done
- fi
- ;;
- esac
- done
- if [ "$dname" = "" ]; then
- dname=$part_name
- offset=`expr $part_offset + $root + $swap`
- _size=`expr $part_size \* $sizemult`
- _offset=`expr $offset \* $sizemult`
- echo -n " :pd#${_size}:od#${_offset}" >> $DT
- echo ":td=4.2BSD:bd#${blocksize}:fd#${fragsize}:\\" >> $DT
- offset=`expr $offset + $part_size`
- elif [ "$ename" = "" ]; then
- ename=$part_name
- _size=`expr $part_size \* $sizemult`
- _offset=`expr $offset \* $sizemult`
- echo -n " :pe#${_size}:oe#${_offset}" >> $DT
- echo ":te=4.2BSD:be#${blocksize}:fe#${fragsize}:\\" >> $DT
- offset=`expr $offset + $part_size`
- elif [ "$fname" = "" ]; then
- fname=$part_name
- _size=`expr $part_size \* $sizemult`
- _offset=`expr $offset \* $sizemult`
- echo -n " :pf#${_size}:of#${_offset}" >> $DT
- echo ":tf=4.2BSD:bf#${blocksize}:ff#${fragsize}:\\" >> $DT
- offset=`expr $offset + $part_size`
- elif [ "$gname" = "" ]; then
- gname=$part_name
- _size=`expr $part_size \* $sizemult`
- _offset=`expr $offset \* $sizemult`
- echo -n " :pg#${_size}:og#${_offset}" >> $DT
- echo ":tg=4.2BSD:bg#${blocksize}:fg#${fragsize}:\\" >> $DT
- offset=`expr $offset + $part_size`
- fi
-done
-echo " :pd#${disksize}:od#0:" >> $DT
-sync
-
-echo ""
-echo "THIS IS YOUR LAST CHANCE!!!"
-echo ""
-echo -n "Are you SURE you want NetBSD installed on your hard drive? (yes/no) "
-answer=""
-while [ "$answer" = "" ]; do
- getresp
- case $resp in
- yes|YES)
- echo ""
- echo "Here we go..."
- answer=yes
- ;;
- no|NO)
- echo ""
- echo -n "OK, then. enter 'halt' to halt the machine. "
- echo "Once the machine has halted,"
- echo -n "remove the floppy, and press any key to "
- echo "reboot."
- exit
- ;;
- *)
- echo -n "I want a yes or no answer... well? "
- ;;
- esac
-done
-
-echo ""
-echo -n "Labeling disk $drivename..."
-$DONTDOIT disklabel -r -w $drivename $labelname
-$DONTDOIT echo "y"|bim -c init -c "add /usr/mdec/boot boot" -c "default 0" -c "exit" /dev/${drivename}c
-echo " done."
-
-if [ "$sect_fwd" = "sf:" ]; then
- echo -n "Initializing bad144 badblock table..."
- $DONTDOIT bad144 $drivename 0
- echo " done."
-fi
-
-echo "Initializing root filesystem, and mounting..."
-$DONTDOIT newfs /dev/r${drivename}a
-$DONTDOIT mount -v /dev/${drivename}a /mnt
-if [ "$dname" != "" -a "$dname" != "NO" ]; then
- echo ""
- echo "Initializing $dname filesystem, and mounting..."
- $DONTDOIT newfs /dev/r${drivename}d
- $DONTDOIT mkdir -p /mnt/$dname
- $DONTDOIT mount -v /dev/${drivename}d /mnt/$dname
-fi
-if [ "$ename" != "" -a "$ename" != "NO" ]; then
- echo ""
- echo "Initializing $ename filesystem, and mounting..."
- $DONTDOIT newfs /dev/r${drivename}e
- $DONTDOIT mkdir -p /mnt/$ename
- $DONTDOIT mount -v /dev/${drivename}e /mnt/$ename
-fi
-if [ "$fname" != "" -a "$fname" != "NO" ]; then
- echo ""
- echo "Initializing $fname filesystem, and mounting..."
- $DONTDOIT newfs /dev/r${drivename}f
- $DONTDOIT mkdir -p /mnt/$fname
- $DONTDOIT mount -v /dev/${drivename}f /mnt/$fname
-fi
-if [ "$gname" != "" -a "$gname" != "NO" ]; then
- echo ""
- echo "Initializing $gname filesystem, and mounting..."
- $DONTDOIT newfs /dev/r${drivename}g
- $DONTDOIT mkdir -p /mnt/$gname
- $DONTDOIT mount -v /dev/${drivename}g /mnt/$gname
-fi
-
-echo ""
-echo "Populating filesystems with bootstrapping binaries and config files"
-$DONTDOIT tar --one-file-system -cf - . | (cd /mnt ; tar --unlink -xpf - )
-$DONTDOIT cp /tmp/.hdprofile /mnt/.profile
-$DONTDOIT gzip -d /mnt/netbsd.gz
-
-echo ""
-echo -n "Creating an fstab..."
-echo /dev/${drivename}a / ffs rw 1 1 | sed -e s,//,/, > $FSTAB
-if [ "$dname" != "" -a "$dname" != "NO" ]; then
- echo /dev/${drivename}d /$dname ffs rw 1 2 | sed -e s,//,/, >> $FSTAB
-fi
-if [ "$ename" != "" -a "$ename" != "NO" ]; then
- echo /dev/${drivename}e /$ename ffs rw 1 2 | sed -e s,//,/, >> $FSTAB
-fi
-if [ "$fname" != "" -a "$fname" != "NO" ]; then
- echo /dev/${drivename}f /$fname ffs rw 1 3 | sed -e s,//,/, >> $FSTAB
-fi
-if [ "$gname" != "" -a "$gname" != "NO" ]; then
- echo /dev/${drivename}g /$gname ffs rw 1 4 | sed -e s,//,/, >> $FSTAB
-fi
-if [ "$hname" != "" -a "$hname" != "NO" ]; then
- echo /dev/${drivename}h /$hname ffs rw 1 5 | sed -e s,//,/, >> $FSTAB
-fi
-sync
-echo " done."
-
-echo ""
-echo ""
-echo "OK! The preliminary work of setting up your disk is now complete."
-echo "You can now boot off the hard drive."
-echo ""
-echo "The remaining tasks are:"
-echo ""
-echo "To load and install the NetBSD distribution sets."
-echo "Currently the hard drive's root filesystem is mounted on /mnt"
-echo ""
-echo "Consult the installation notes which will describe how to"
-echo "install the distribution sets and kernel. Post-installation"
-echo "configuration is also discussed therein."
-echo ""
-echo "GOOD LUCK!"
-echo ""
diff --git a/distrib/pc532/floppies/inst/list b/distrib/pc532/floppies/inst/list
deleted file mode 100644
index a46e724a32f..00000000000
--- a/distrib/pc532/floppies/inst/list
+++ /dev/null
@@ -1,11 +0,0 @@
-# $OpenBSD: list,v 1.3 2000/03/01 22:10:06 todd Exp $
-
-# the disktab explanation file
-COPY disktab.preinstall etc
-
-# and the installation tools
-COPY dot.profile .profile
-COPY dot.instutils .instutils
-COPY install.sh install
-COPY dot.hdprofile tmp/.hdprofile
-SPECIAL chmod 755 install
diff --git a/distrib/pc532/floppies/list2sh.awk b/distrib/pc532/floppies/list2sh.awk
deleted file mode 100644
index eda205a961b..00000000000
--- a/distrib/pc532/floppies/list2sh.awk
+++ /dev/null
@@ -1,44 +0,0 @@
-# $OpenBSD: list2sh.awk,v 1.3 2000/03/01 22:10:05 todd Exp $
-
-BEGIN {
- printf("cd ${CURDIR}\n");
- printf("\n");
-}
-/^$/ || /^#/ {
- print $0;
- next;
-}
-$1 == "COPY" {
- printf("echo '%s'\n", $0);
- printf("cp %s ${TARGDIR}/%s\n", $2, $3);
- next;
-}
-$1 == "LINK" {
- printf("echo '%s'\n", $0);
- printf("(cd ${TARGDIR}; ln %s %s)\n", $2, $3);
- next;
-}
-$1 == "SYMLINK" {
- printf("echo '%s'\n", $0);
- printf("(cd ${TARGDIR}; ln -s %s %s)\n", $2, $3);
- next;
-}
-$1 == "SPECIAL" {
- printf("echo '%s'\n", $0);
- printf("(cd ${TARGDIR};");
- for (i = 2; i <= NF; i++)
- printf(" %s", $i);
- printf(")\n");
- next;
-}
-{
- printf("echo '%s'\n", $0);
- printf("echo 'Unknown keyword \"%s\" at line %d of input.'\n", $1, NR);
- printf("exit 1\n");
- exit 1;
-}
-END {
- printf("\n");
- printf("exit 0\n");
- exit 0;
-}
diff --git a/distrib/pc532/floppies/runlist.sh b/distrib/pc532/floppies/runlist.sh
deleted file mode 100644
index a73ac004576..00000000000
--- a/distrib/pc532/floppies/runlist.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-# $OpenBSD: runlist.sh,v 1.3 2000/03/01 22:10:06 todd Exp $
-
-if [ "X$1" = "X-d" ]; then
- SHELLCMD=cat
- shift
-else
- SHELLCMD="sh -e"
-fi
-
-( while [ "X$1" != "X" ]; do
- cat $1
- shift
-done ) | awk -f ${TOPDIR}/list2sh.awk | ${SHELLCMD}
diff --git a/distrib/pc532/floppies/upgr/Makefile b/distrib/pc532/floppies/upgr/Makefile
deleted file mode 100644
index c3c2c1adc30..00000000000
--- a/distrib/pc532/floppies/upgr/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# $OpenBSD: Makefile,v 1.3 2000/03/01 22:10:07 todd Exp $
-
-TOP= ${.CURDIR}/..
-
-.include "${TOP}/Makefile.inc"
-IMAGE= upgr-${REV}.fs
-
-.include "${TOP}/inst-common/Makefile.inc"
diff --git a/distrib/pc532/floppies/upgr/dot.hdprofile b/distrib/pc532/floppies/upgr/dot.hdprofile
deleted file mode 100644
index 87d736abc00..00000000000
--- a/distrib/pc532/floppies/upgr/dot.hdprofile
+++ /dev/null
@@ -1,62 +0,0 @@
-# $OpenBSD: dot.hdprofile,v 1.4 2000/03/01 22:10:08 todd Exp $
-#
-# Copyright (c) 1994 Christopher G. Demetriou
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by Christopher G. Demetriou.
-# 4. The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
-export PATH
-TERM=pc3
-export TERM
-
-umask 022
-
-if [ "X${DONEPROFILE}" = "X" ]; then
- DONEPROFILE=YES
-
- echo "Checking filesystems..."
- fsck -y
-
- echo "Mounting filesystems..."
- mount -a
-
- # set up some sane defaults
- echo 'erase ^?, werase ^W, kill ^U, intr ^C'
- stty newcrt werase ^W intr ^C kill ^U erase ^? 9600
- echo ''
-
- # run update, so that installed software is written as it goes.
- update
-
- # pull in the functions that people will use from the shell prompt.
- . /.commonutils
- . /.upgrutils
-
- echo "Follow the installation directions to install the NetBSD"
- echo "distribution sets."
-fi
diff --git a/distrib/pc532/floppies/upgr/dot.profile b/distrib/pc532/floppies/upgr/dot.profile
deleted file mode 100644
index c3bcc9e2c8a..00000000000
--- a/distrib/pc532/floppies/upgr/dot.profile
+++ /dev/null
@@ -1,57 +0,0 @@
-# $OpenBSD: dot.profile,v 1.5 2000/10/25 16:38:13 millert Exp $
-#
-# Copyright (c) 1994 Christopher G. Demetriou
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by Christopher G. Demetriou.
-# 4. The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-export PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
-export HISTFILE=/.sh_history
-export TERM=pc3
-
-umask 022
-
-set -o emacs # emacs-style command line editing
-
-if [ "X${DONEPROFILE}" = "X" ]; then
- DONEPROFILE=YES
-
- # set up some sane defaults
- echo 'erase ^?, werase ^W, kill ^U, intr ^C, status ^T'
- stty newcrt werase ^W intr ^C kill ^U erase ^? status ^T 9600
- echo ''
-
- # run update, so that installed software is written as it goes.
- update
-
- # pull in the functions that people will use from the shell prompt.
- . /.commonutils
- . /.upgrutils
-
- # run the upgrade script.
- upgrade
-fi
diff --git a/distrib/pc532/floppies/upgr/dot.upgrutils b/distrib/pc532/floppies/upgr/dot.upgrutils
deleted file mode 100644
index 7a171254e7a..00000000000
--- a/distrib/pc532/floppies/upgr/dot.upgrutils
+++ /dev/null
@@ -1,58 +0,0 @@
-# $OpenBSD: dot.upgrutils,v 1.4 2000/03/01 22:10:08 todd Exp $
-#
-# Copyright (c) 1994 Christopher G. Demetriou
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by Christopher G. Demetriou.
-# 4. The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-# Upgrade cleanup utilites (functions), to make sure a recently-upgraded
-# system is safely runnable. These are meant to be invoked from the shell
-# prompt, by people installing NetBSD.
-
-Cleanup()
-{
- upgrade_dir=/
-
- if [ ! -f /etc/fstab ]; then
- upgrade_dir=/mnt
- fi
-
- echo "Cleaning up miscellaneous files in /etc..."
- mv $upgrade_dir/etc/rc.bak $upgrade_dir/etc/rc
- chroot $upgrade_dir /usr/sbin/pwd_mkdb -p /etc/master.passwd
- chroot $upgrade_dir /bin/rm /etc/sendmail.fc > /dev/null 2>&1
- sync
- echo "Done."
-
- echo ""
- echo "All that's left to do now is to install a new NetBSD kernel"
- echo "on your hard disk. You should now halt your machine using"
- echo "the 'halt' command. Once the machine is halted, replace the"
- echo "installation floppy with the kernel-copy floppy and hit any"
- echo "key to reboot. Use the kernel-copy floppy to copy a kernel"
- echo "to your hard disk."
-}
diff --git a/distrib/pc532/floppies/upgr/list b/distrib/pc532/floppies/upgr/list
deleted file mode 100644
index 14b06dcfd7b..00000000000
--- a/distrib/pc532/floppies/upgr/list
+++ /dev/null
@@ -1,8 +0,0 @@
-# $OpenBSD: list,v 1.3 2000/03/01 22:10:08 todd Exp $
-
-# and the upgrade tools
-COPY dot.profile .profile
-COPY dot.upgrutils .upgrutils
-COPY upgrade.sh upgrade
-COPY dot.hdprofile tmp/.hdprofile
-SPECIAL chmod 755 upgrade
diff --git a/distrib/pc532/floppies/upgr/upgrade.sh b/distrib/pc532/floppies/upgr/upgrade.sh
deleted file mode 100644
index d7a8c390e41..00000000000
--- a/distrib/pc532/floppies/upgr/upgrade.sh
+++ /dev/null
@@ -1,253 +0,0 @@
-#!/bin/sh
-# $OpenBSD: upgrade.sh,v 1.5 2000/03/01 22:10:08 todd Exp $
-#
-# Copyright (c) 1994 Christopher G. Demetriou
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by Christopher G. Demetriou.
-# 4. The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-# NetBSD upgrade script.
-# In a perfect world, this would be a nice C program, with a reasonable
-# user interface.
-
-DT=/etc/disktab # /etc/disktab
-FSTABDIR=/mnt/etc # /mnt/etc
-#DONTDOIT=echo
-
-VERSION=1.0
-FSTAB=${FSTABDIR}/fstab
-
-getresp() {
- read resp
- if [ "X$resp" = "X" ]; then
- resp=$1
- fi
-}
-
-echo "Welcome to the NetBSD ${VERSION} upgrade program."
-echo ""
-echo "This program is designed to help you put the new version of NetBSD"
-echo "on your hard disk, in a simple and rational way. To upgrade, you"
-echo "must have plenty of free space on all partitions which will be"
-echo "upgraded. If you have at least 1MB free on your root partition,"
-echo "and several free on your /usr patition, you should be fine."
-echo ""
-echo "As with anything which modifies your hard drive's contents, this"
-echo "program can cause SIGNIFICANT data loss, and you are advised"
-echo "to make sure your hard drive is backed up before beginning the"
-echo "upgrade process."
-echo ""
-echo "Default answers are displyed in brackets after the questions."
-echo "You can hit Control-C at any time to quit, but if you do so at a"
-echo "prompt, you may have to hit return. Also, quitting in the middle of"
-echo "the upgrade may leave your system in an inconsistent (and unusable)"
-echo "state."
-echo ""
-echo -n "Proceed with upgrade? [n] "
-getresp "n"
-case "$resp" in
- y*|Y*)
- echo "Cool! Let's get to it..."
- ;;
- *)
- echo ""
- echo "OK, then. Enter 'halt' at the prompt to halt the"
- echo "machine. Once the machine has halted, remove the"
- echo "floppy and press any key to reboot."
- exit
- ;;
-esac
-
-# find out what units are possible, and query the user.
-driveunits=`ls /dev/[sw]d?a | sed -e 's,/dev/\(...\)a,\1,g'`
-if [ "X${driveunits}" = "X" ]; then
- echo "FATAL ERROR:"
- echo "No disk devices."
- echo "This is probably a bug in the install disks."
- echo "Exiting install program."
- exit
-fi
-
-echo ""
-echo "The following disks are supported by this upgrade procedure:"
-echo " "${driveunits}
-echo "If your system was previously completely contained within the"
-echo "disks listed above (i.e. if your system didn't occupy any space"
-echo "on disks NOT listed above), this upgrade disk can upgrade your"
-echo "system. If it cannot, hit Control-C at the prompt."
-echo ""
-while [ "X${drivename}" = "X" ]; do
- echo -n "Which disk contains your root partion? "
- getresp
- otherdrives=`echo "${driveunits}" | sed -e s,${resp},,`
- if [ "X${driveunits}" = "X${otherdrives}" ]; then
- echo ""
- echo "\"${resp}\" is an invalid drive name. Valid choices"
- echo "are: "${driveunits}
- echo ""
- else
- drivename=${resp}
- fi
-done
-
-echo ""
-echo "Root partition is on ${drivename}a."
-
-echo ""
-echo "Would you like to upgrade your file systems to the new file system"
-echo -n "format? [y] "
-getresp "y"
-case "$resp" in
- n*|N*)
- echo ""
- echo "You should upgrade your file systems with 'fsck -c 2'"
- echo "as soon as is feasible, because the new file system"
- echo "code is better-tested and more performant."
- upgradefs=NO
- ;;
- *)
- upgradefs=YES
- ;;
-esac
-
-if [ $upgradefs = YES ]; then
- echo ""
- echo "Upgrading the file system on ${drivename}a..."
-
- fsck -p -c 2 /dev/r${drivename}a
- if [ $? != 0 ]; then
- echo "FATAL ERROR: FILE SYSTEM UPGRADE FAILED."
- echo "You should probably reboot the machine, fsck your"
- echo "disk(s), and try the upgrade procedure again."
- exit 1
- fi
- echo "Done."
-fi
-
-echo ""
-echo "Mounting root partition on /mnt..."
-mount /dev/${drivename}a /mnt
-if [ $? != 0 ]; then
- echo "FATAL ERROR: MOUNT FAILED."
- echo "You should verify that your system is set up as you"
- echo "described, and re-attempt the upgrade procedure."
- exit 1
-fi
-echo "Done."
-
-if [ $upgradefs = YES ]; then
- echo ""
- echo -n "Copying new fsck binary to your hard disk..."
- if [ ! -d /mnt/sbin ]; then
- mkdir /mnt/sbin
- fi
- cp /sbin/fsck /mnt/sbin/fsck
- if [ $? != 0 ]; then
- echo "FATAL ERROR: COPY FAILED."
- echo "It in unclear why this error would occur. It looks"
- echo "like you may end up having to upgrade by hand."
- exit 1
- fi
- echo " Done."
-
- echo ""
- echo "Re-mounting root partition read-only..."
- mount -u -o ro /dev/${drivename}a /mnt
- if [ $? != 0 ]; then
- echo "FATAL ERROR: RE-MOUNT FAILED."
- echo "It in unclear why this error would occur. It looks"
- echo "like you may end up having to upgrade by hand."
- exit 1
- fi
- echo "Done."
-
- echo ""
- echo "Upgrading the rest of your file systems..."
- chroot /mnt fsck -p -c 2
- if [ $? != 0 ]; then
- echo "FATAL ERROR: FILE SYSTEM UPGRADE(S) FAILED."
- echo "You should probably reboot the machine, fsck your"
- echo "file system(s), and try the upgrade procedure"
- echo "again."
- exit 1
- fi
- echo "Done."
-
- echo ""
- echo "Re-mounting root partition read-write..."
- mount -u -o rw /dev/${drivename}a /mnt
- if [ $? != 0 ]; then
- echo "FATAL ERROR: RE-MOUNT FAILED."
- echo "It in unclear why this error would occur. It looks"
- echo "like you may end up having to upgrade by hand."
- exit 1
- fi
- echo "Done."
-fi
-
-echo ""
-echo "Updating boot blocks on ${drivename}..."
-disklabel -r $drivename > /mnt/tmp/${drivename}.label
-if [ $? != 0 ]; then
- echo "FATAL ERROR: READ OF DISK LABEL FAILED."
- echo "It in unclear why this error would occur. It looks"
- echo "like you may end up having to upgrade by hand."
- exit 1
-fi
-disklabel -R -B $drivename /mnt/tmp/${drivename}.label
-if [ $? != 0 ]; then
- echo "FATAL ERROR: UPDATE OF DISK LABEL FAILED."
- echo "It in unclear why this error would occur. It looks"
- echo "like you may end up having to upgrade by hand."
- exit 1
-fi
-echo "Done."
-
-echo ""
-echo "Copying bootstrapping binaries and config files to the hard drive..."
-$DONTDOIT cp /mnt/.profile /mnt/.profile.bak
-$DONTDOIT tar --exclude etc --one-file-system -cf - . | (cd /mnt ; tar --unlink -xpf - )
-$DONTDOIT mv /mnt/etc/rc /mnt/etc/rc.bak
-$DONTDOIT cp /tmp/.hdprofile /mnt/.profile
-
-echo ""
-echo "Mounting remaining partitions..."
-chroot /mnt mount -at ufs > /dev/null 2>&1
-echo "Done."
-
-echo ""
-echo ""
-echo "OK! The preliminary work of setting up your disk is now complete,"
-echo "and you can now upgrade the actual NetBSD software."
-echo ""
-echo "Right now, your hard disk is mounted on /mnt. You should consult"
-echo "the installation notes to determine how to load and install the new"
-echo "NetBSD distribution sets, and how to clean up after the upgrade"
-echo "software, when you are done."
-echo ""
-echo "GOOD LUCK!"
-echo ""
diff --git a/distrib/sets/README b/distrib/sets/README
deleted file mode 100644
index 636b25562ac..00000000000
--- a/distrib/sets/README
+++ /dev/null
@@ -1,125 +0,0 @@
-From cgd@alpha.bostic.com Mon Jul 18 02:06:15 1994
-Received: from alpha.bostic.com (alpha.BOSTIC.COM [198.3.132.5]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with SMTP id CAA18402 for <port-masters@sun-lamp.CS.Berkeley.EDU>; Mon, 18 Jul 1994 02:01:32 -0700
-Received: by alpha.bostic.com; id AA06610; Mon, 18 Jul 1994 05:02:11 -0400
-Message-Id: <9407180902.AA06610@alpha.bostic.com>
-To: port-masters@sun-lamp.CS.Berkeley.EDU
-Cc: cgd@alpha.bostic.com
-Precedence: special-delivery
-X-Notice: Do not redistribute in any form without prior explicit
- consent of the author.
-Subject: distribution sets, etc...
-Date: Mon, 18 Jul 1994 05:02:11 -0400
-From: "Chris G. Demetriou" <cgd@alpha.bostic.com>
-Status: R
-
-[ this is also going in a README in the 'sets' directory... ]
-
-well, i've finally sat down and started doing distribution set
-stuff in a "nice, machine-independent way." Should have done
-it months ago, but too much other stuff going on then...
-
-anyway, grab ~cgd/sets.tar.gz -- it's three scripts, and a bunch
-of files.
-
-the scripts should be run from the directory where they reside.
-
-makeflist: output the list of files that should be in a
- distribution, according to the contents of the
- 'lists' directory.
-
-checkflist: check the file list (as internally generated
- by makeflist) against the tree living in $DESTDIR.
- (that tree should be made with 'make distribution'.)
-
-maketars: make tarballs of the various sets in the distribution,
- based on the contents of the lists, the tree in
- $DESTDIR, and put the tarballs in $RELEASEDIR.
- Note that this script _doesn't_ create the 'secr'
- distribution, because (for now) it requires
- manual intervention to get the binaries right...
- (i'll add another script to create that dist, later.)
-
-what's in 'lists':
-
-lists describing file sets. There are two sets of lists per file
-set: machine dependent and machine-independent files. (there's
-also another file in the 'man' dir, which is used by the 'man'
-and 'misc' sets, but that's explained later.)
-
-There is one machine-independent file, named "mi". There are
-N machine-dependent files (one per architecture), named "md.${ARCH}".
-
-the sets are as follows:
-
- secr: security software -- the non-exportable bits, i.e.
- those that actually use crypt, and have it compiled
- in.
-
- base: the base binary set. excludes everything described
- below.
-
- comp: compiler tools. All of the tools relating to C, C++,
- and FORTRAN (yes, there are two!) that are in the
- tree. This includes includes, the linker, tool chain,
- and the .a versions of the libraries. (obviously,
- base includes ldd, ld.so, and the shared versions.
- base also includes 'cpp', because that's used by X11.)
- includes the man pages for all the binaries contained
- within. Also, includes all library and system call
- manual pages.
-
- etc: /etc, and associated files (/var/cron/tabs, /root,
- etc.). things that shouldn't be blindly reinstalled
- on an upgrade.
-
- games: the games and their man pages.
-
- man: all of the man pages for the system, except those
- listed elsewhere (e.g. in comp, games, misc).
- Includes machine-dependent man pages for this CPU.
-
- misc: share/dict, share/doc, and the machine-dependent
- man pages for other cpu's which happen to always
- be installed.
-
-as noted, in addition to the "standard" files in each dir, there's
-a file called 'md_share' in lists/man. it's the list of man pages
-that are installed from /usr/src/share, which are machine-dependent.
-(note that ones that are installed from elsewhere, and thus are
-installed on only one architecture, are listed in the md.${ARCH}
-file.) basically, it's grepped through, to see which of the
-machine-dependent man pages that are always installed should go
-in the 'man' set, and which should go into the 'misc' set.
-
-
-I've made attempts to get the md files for the amiga, i386, hp300,
-pc532, and sparc done. I've not attempted the rest (though there
-are empty files for all architectures except the da30, in the
-various directories). I think i got the amiga, i386, and sparc
-done correctly, but i know that (because of weirdnesses in how
-their last snapshots were built) i didn't get hp300 or pc532
-done right.
-
-what you folks need to do:
-
-run 'checkflist' on a tree that you've created with 'make
-distribution'. send me the output, and i'll take care of putting
-stuff on the right lists for you. In the future, you'll get
-to do it yourselves, as you add programs and include files, but
-i'd prefer to do it the first time (unless you really want to do it
-yourself -- in that case, please ask me to check your suggestions
-re: the appropriate sets for things...) There should be a minimal
-list output by checkflist -- it should all be things that
-_should_ be on your lsits, but aren't, i.e. machine-dependent
-binaries, man pages, and include files.
-
-Also, please look through the lists, and tell me if you think
-i've put anything in the wrong place. i think i've
-taken care of all of the machine-dependence bugaboos, by
-doing it for the N architectures, but i'm not _sure_... 8-)
-
-
-thanks,
-
-chris
-
diff --git a/distrib/utils/Makefile b/distrib/utils/Makefile
deleted file mode 100644
index 8e0322719ac..00000000000
--- a/distrib/utils/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# $OpenBSD: Makefile,v 1.2 1997/09/21 11:46:06 deraadt Exp $
-
-SUBDIR= libhack init_s ssh tls x_dd x_ifconfig
-
-.include <bsd.subdir.mk>
diff --git a/distrib/utils/Makefile.inc b/distrib/utils/Makefile.inc
deleted file mode 100644
index 39ce59deb08..00000000000
--- a/distrib/utils/Makefile.inc
+++ /dev/null
@@ -1,8 +0,0 @@
-# $OpenBSD: Makefile.inc,v 1.5 1997/09/21 11:46:07 deraadt Exp $
-# utils one might want in a crunched binary
-
-LDSTATIC= -static
-
-install: .NOTMAIN
- @echo "install not expected"
-
diff --git a/distrib/utils/README b/distrib/utils/README
deleted file mode 100644
index 6a940c065ca..00000000000
--- a/distrib/utils/README
+++ /dev/null
@@ -1,43 +0,0 @@
-From: "Gordon W. Ross" <gwr>
-Date: Tue, 3 Oct 95 16:37:39 EDT
-Subject: New ramdisk, tiny shell, etc.
-[ edited since the original mail ]
-
-As part of my efforts to build a RAM-disk root kernel for the
-sun3 port, I've developed some things that others may want:
-
-New RAM-disk: [ see sys/dev/ramdisk.c ]
-
-New "small/tiny" tools, to replace some of the larger
-programs that one usually wants on a ramdisk root:
-
-ssh: (small shell)
- * Consumes only about 8K of memory on an m68k!
- (saves about 100K in the ramdisk...)
- * Can run programs, possibly with I/O redirection
- * Just enough to let you run the programs needed
- while partitioning and copying miniroot to swap.
-
-tls: (tiny ls)
- * Consumes only about 4K of memory on an m68k!
- (saves about 10K in the ramdisk...)
- * Long format only, nothing fancy.
-
-Also, in the new "src/distrib/utils" area, I've made build
-directories for some programs that build smaller versions,
-usually by adding special CFLAGS
-
-init_s: (built with -DLETS_GET_SMALL)
- * Forces single-user mode
- * Eliminates unnecessary code
-
-libhack: small implementation of some libc functions
- * Needs only /etc/passwd (not pwd.db, spwd.db)
- * Reduces size of an m68k crunched binary by about 64K
-
-x_dd: built with -DNO_CONV (no conv=* options)
-
-x_ifconfig: supports inet only
-
-The x_ prefix on the above is to make the names unique so
-crunchgen will not confuse them with the real sources.
diff --git a/distrib/utils/init_s/Makefile b/distrib/utils/init_s/Makefile
deleted file mode 100644
index 2951ee15ff2..00000000000
--- a/distrib/utils/init_s/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-# $OpenBSD: Makefile,v 1.3 2000/03/01 22:10:11 todd Exp $
-# $NetBSD: Makefile,v 1.4 1996/03/27 04:48:40 scottr Exp $
-# Build a "small init" (i.e. for boot media)
-
-PROG= init
-NOMAN=
-
-# Need -lutil for: logout, logwtmp, login_tty
-DPADD= ${LIBUTIL}
-LDADD= -lutil
-
-SRCDIR= ${.CURDIR}/../../../sbin/init
-CFLAGS+= -DLETS_GET_SMALL -I${SRCDIR}
-
-all: ${PROG}
-
-.include <bsd.prog.mk>
-
-.PATH: ${SRCDIR}
diff --git a/distrib/utils/libhack/Makefile b/distrib/utils/libhack/Makefile
deleted file mode 100644
index 2668b56c92e..00000000000
--- a/distrib/utils/libhack/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-# $OpenBSD: Makefile,v 1.2 2000/03/01 22:10:12 todd Exp $
-# $NetBSD: Makefile,v 1.2 1995/10/13 18:10:19 gwr Exp $
-#
-# Stubs to kill off some things from libc:
-# This save space on a boot system.
-#
-
-LIB= hack
-SRCS= getgrent.c gethost.c getnetgr.c getpwent.c
-
-NOPIC=
-NOPROFILE=
-
-all: libhack.a
-
-tpwent: getpwent.c
- $(CC) -g -o $@.o -DTEST_MAIN -c getpwent.c
- $(CC) -o $@ $@.o
-
-.include <bsd.lib.mk>
diff --git a/distrib/utils/libhack/Makefile.inc b/distrib/utils/libhack/Makefile.inc
deleted file mode 100644
index 47d33340ee6..00000000000
--- a/distrib/utils/libhack/Makefile.inc
+++ /dev/null
@@ -1,26 +0,0 @@
-# $OpenBSD: Makefile.inc,v 1.2 2000/03/01 22:10:12 todd Exp $
-# $NetBSD: Makefile.inc,v 1.2 1995/10/13 18:10:20 gwr Exp $
-# Include this fragment to build libhack.o
-# It is .o and not .a to make sure these are the
-# objects you get (and not the ones in libc.a)
-
-HACKOBJS= gethost.o getpwent.o getgrent.o getnetgr.o
-
-libhack.o : $(HACKOBJS)
- $(LD) -r -o $@ $(HACKOBJS)
-
-gethost.o : ${HACKSRC}/gethost.c
- $(CC) -c ${HACKSRC}/gethost.c
-
-getpwent.o : ${HACKSRC}/getpwent.c
- $(CC) -c ${HACKSRC}/getpwent.c
-
-getgrent.o : ${HACKSRC}/getgrent.c
- $(CC) -c ${HACKSRC}/getgrent.c
-
-getnetgr.o : ${HACKSRC}/getnetgr.c
- $(CC) -c ${HACKSRC}/getnetgr.c
-
-yplib.o : ${HACKSRC}/yplib.c
- $(CC) -c ${HACKSRC}/yplib.c
-
diff --git a/distrib/utils/libhack/getgrent.c b/distrib/utils/libhack/getgrent.c
deleted file mode 100644
index 6fd3750612a..00000000000
--- a/distrib/utils/libhack/getgrent.c
+++ /dev/null
@@ -1,188 +0,0 @@
-/* $OpenBSD: getgrent.c,v 1.2 2000/03/01 22:10:12 todd Exp $ */
-/* $NetBSD: getgrent.c,v 1.2 1995/10/13 18:10:23 gwr Exp $ */
-
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- * Portions Copyright (c) 1994, Jason Downs. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Copied from: lib/libc/gen/getgrent.c
- * and then gutted, leaving only /etc/group support.
- */
-
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <grp.h>
-
-static FILE *_gr_fp;
-static struct group _gr_group;
-static int _gr_stayopen;
-static int grscan(), start_gr();
-
-#define MAXGRP 200
-static char *members[MAXGRP];
-#define MAXLINELENGTH 1024
-static char line[MAXLINELENGTH];
-
-struct group *
-getgrent()
-{
- if (!_gr_fp && !start_gr() || !grscan(0, 0, NULL))
- return(NULL);
- return(&_gr_group);
-}
-
-struct group *
-getgrnam(name)
- const char *name;
-{
- int rval;
-
- if (!start_gr())
- return(NULL);
- rval = grscan(1, 0, name);
- if (!_gr_stayopen)
- endgrent();
- return(rval ? &_gr_group : NULL);
-}
-
-struct group *
-#ifdef __STDC__
-getgrgid(gid_t gid)
-#else
-getgrgid(gid)
- gid_t gid;
-#endif
-{
- int rval;
-
- if (!start_gr())
- return(NULL);
- rval = grscan(1, gid, NULL);
- if (!_gr_stayopen)
- endgrent();
- return(rval ? &_gr_group : NULL);
-}
-
-static int
-start_gr()
-{
- if (_gr_fp) {
- rewind(_gr_fp);
- return(1);
- }
- return((_gr_fp = fopen(_PATH_GROUP, "r")) ? 1 : 0);
-}
-
-void
-setgrent()
-{
- (void) setgroupent(0);
-}
-
-int
-setgroupent(stayopen)
- int stayopen;
-{
- if (!start_gr())
- return(0);
- _gr_stayopen = stayopen;
- return(1);
-}
-
-void
-endgrent()
-{
- if (_gr_fp) {
- (void)fclose(_gr_fp);
- _gr_fp = NULL;
- }
-}
-
-static int
-grscan(search, gid, name)
- register int search, gid;
- register char *name;
-{
- register char *cp, **m;
- char *bp;
-
- for (;;) {
- if (!fgets(line, sizeof(line), _gr_fp))
- return(0);
- bp = line;
- /* skip lines that are too big */
- if (!strchr(line, '\n')) {
- int ch;
-
- while ((ch = getc(_gr_fp)) != '\n' && ch != EOF)
- ;
- continue;
- }
- _gr_group.gr_name = strsep(&bp, ":\n");
- if (search && name && strcmp(_gr_group.gr_name, name))
- continue;
- _gr_group.gr_passwd = strsep(&bp, ":\n");
- if (!(cp = strsep(&bp, ":\n")))
- continue;
- _gr_group.gr_gid = atoi(cp);
- if (search && name == NULL && _gr_group.gr_gid != gid)
- continue;
- cp = NULL;
- if (bp == NULL)
- continue;
- for (m = _gr_group.gr_mem = members;; bp++) {
- if (m == &members[MAXGRP - 1])
- break;
- if (*bp == ',') {
- if (cp) {
- *bp = '\0';
- *m++ = cp;
- cp = NULL;
- }
- } else if (*bp == '\0' || *bp == '\n' || *bp == ' ') {
- if (cp) {
- *bp = '\0';
- *m++ = cp;
- }
- break;
- } else if (cp == NULL)
- cp = bp;
- }
- *m = NULL;
- return(1);
- }
- /* NOTREACHED */
-}
diff --git a/distrib/utils/libhack/gethost.c b/distrib/utils/libhack/gethost.c
deleted file mode 100644
index ef3237adef6..00000000000
--- a/distrib/utils/libhack/gethost.c
+++ /dev/null
@@ -1,267 +0,0 @@
-/* $OpenBSD: gethost.c,v 1.2 2000/03/01 22:10:12 todd Exp $ */
-/* $NetBSD: gethost.c,v 1.2 1995/10/13 18:10:25 gwr Exp $ */
-
-/*-
- * Copyright (c) 1985, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- * -
- * --Copyright--
- */
-
-/*
- * Copied from: lib/libc/net/gethostnamadr.c
- * and then gutted, leaving only /etc/hosts support.
- */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-
-#define MAXALIASES 35
-#define MAXADDRS 35
-
-static char *h_addr_ptrs[MAXADDRS + 1];
-
-static struct hostent host;
-static char *host_aliases[MAXALIASES];
-static char hostbuf[BUFSIZ+1];
-static struct in_addr host_addr;
-static FILE *hostf = NULL;
-static int stayopen = 0;
-
-#if PACKETSZ > 1024
-#define MAXPACKET PACKETSZ
-#else
-#define MAXPACKET 1024
-#endif
-
-extern int h_errno;
-
-struct hostent *
-gethostbyname(name)
- const char *name;
-{
- register const char *cp;
- int n, i;
- extern struct hostent *_gethtbyname();
-
- /*
- * disallow names consisting only of digits/dots, unless
- * they end in a dot.
- */
- if (isdigit(name[0]))
- for (cp = name;; ++cp) {
- if (!*cp) {
- if (*--cp == '.')
- break;
- /*
- * All-numeric, no dot at the end.
- * Fake up a hostent as if we'd actually
- * done a lookup.
- */
- if (!inet_aton(name, &host_addr)) {
- h_errno = HOST_NOT_FOUND;
- return((struct hostent *) NULL);
- }
- host.h_name = (char *)name;
- host.h_aliases = host_aliases;
- host_aliases[0] = NULL;
- host.h_addrtype = AF_INET;
- host.h_length = sizeof(u_int32_t);
- h_addr_ptrs[0] = (char *)&host_addr;
- h_addr_ptrs[1] = NULL;
- host.h_addr_list = h_addr_ptrs;
- return (&host);
- }
- if (!isdigit(*cp) && *cp != '.')
- break;
- }
-
- /* XXX - Force host table lookup. */
- return (_gethtbyname(name));
-}
-
-struct hostent *
-gethostbyaddr(addr, len, type)
- const char *addr;
- int len, type;
-{
- int n, i;
- char qbuf[MAXDNAME];
- extern struct hostent *_gethtbyaddr();
-
- if (type != AF_INET)
- return ((struct hostent *) NULL);
- (void)sprintf(qbuf, "%u.%u.%u.%u.in-addr.arpa",
- ((unsigned)addr[3] & 0xff),
- ((unsigned)addr[2] & 0xff),
- ((unsigned)addr[1] & 0xff),
- ((unsigned)addr[0] & 0xff));
-
- /* XXX - Force host table lookup. */
- return (_gethtbyaddr(addr, len, type));
-}
-
-void
-_sethtent(f)
- int f;
-{
- if (hostf == NULL)
- hostf = fopen(_PATH_HOSTS, "r" );
- else
- rewind(hostf);
- stayopen = f;
-}
-
-void
-_endhtent()
-{
- if (hostf && !stayopen) {
- (void) fclose(hostf);
- hostf = NULL;
- }
-}
-
-struct hostent *
-_gethtent()
-{
- char *p;
- register char *cp, **q;
-
- if (hostf == NULL && (hostf = fopen(_PATH_HOSTS, "r" )) == NULL)
- return (NULL);
-again:
- if ((p = fgets(hostbuf, BUFSIZ, hostf)) == NULL)
- return (NULL);
- if (*p == '#')
- goto again;
- cp = strpbrk(p, "#\n");
- if (cp == NULL)
- goto again;
- *cp = '\0';
- cp = strpbrk(p, " \t");
- if (cp == NULL)
- goto again;
- *cp++ = '\0';
- /* THIS STUFF IS INTERNET SPECIFIC */
- h_addr_ptrs[0] = (char *)&host_addr;
- h_addr_ptrs[1] = NULL;
- (void) inet_aton(p, &host_addr);
- host.h_addr_list = h_addr_ptrs;
- host.h_length = sizeof(u_int32_t);
- host.h_addrtype = AF_INET;
- while (*cp == ' ' || *cp == '\t')
- cp++;
- host.h_name = cp;
- q = host.h_aliases = host_aliases;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &host_aliases[MAXALIASES - 1])
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- }
- *q = NULL;
- return (&host);
-}
-
-struct hostent *
-_gethtbyname(name)
- char *name;
-{
- register struct hostent *p;
- register char **cp;
-
- _sethtent(0);
- while (p = _gethtent()) {
- if (strcasecmp(p->h_name, name) == 0)
- break;
- for (cp = p->h_aliases; *cp != 0; cp++)
- if (strcasecmp(*cp, name) == 0)
- goto found;
- }
-found:
- _endhtent();
- if (p==NULL)
- h_errno = HOST_NOT_FOUND;
- return (p);
-}
-
-struct hostent *
-_gethtbyaddr(addr, len, type)
- const char *addr;
- int len, type;
-{
- register struct hostent *p;
-
- _sethtent(0);
- while (p = _gethtent())
- if (p->h_addrtype == type && !bcmp(p->h_addr, addr, len))
- break;
- _endhtent();
- if (p==NULL)
- h_errno = HOST_NOT_FOUND;
- return (p);
-}
-
diff --git a/distrib/utils/libhack/getnetgr.c b/distrib/utils/libhack/getnetgr.c
deleted file mode 100644
index 1d8e88d2307..00000000000
--- a/distrib/utils/libhack/getnetgr.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* $OpenBSD: getnetgr.c,v 1.2 2000/03/01 22:10:12 todd Exp $ */
-/* $NetBSD: getnetgr.c,v 1.2 1995/10/13 18:10:26 gwr Exp $ */
-
-/*
- * Just stub these out, so it looks like
- * we are not in any any netgroups.
- */
-
-void
-endnetgrent()
-{
-}
-
-void
-setnetgrent(ng)
- const char *ng;
-{
-}
-
-int
-getnetgrent(host, user, domain)
- const char **host;
- const char **user;
- const char **domain;
-{
- return 0;
-}
-
-int
-innetgr(grp, host, user, domain)
- const char *grp, *host, *user, *domain;
-{
- return 0;
-}
diff --git a/distrib/utils/libhack/getpwent.c b/distrib/utils/libhack/getpwent.c
deleted file mode 100644
index 472c51fabd4..00000000000
--- a/distrib/utils/libhack/getpwent.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/* $OpenBSD: getpwent.c,v 1.2 2000/03/01 22:10:12 todd Exp $ */
-/* $NetBSD: getpwent.c,v 1.2 1995/10/13 18:10:27 gwr Exp $ */
-
-/*
- * Copyright (c) 1995 Gordon W. Ross
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- * 4. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Gordon W. Ross
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Smaller replacement for: libc/gen/getpwent.c
- * Needed by programs like: rsh, rlogin
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <pwd.h>
-
-#define PWNULL (struct passwd *)0
-#define MAXFIELD 8
-
-static char *pw_file = "/etc/passwd";
-static FILE *pw_fp;
-static char pw_line[128];
-static struct passwd pw_ent;
-
-/*
- * Open passwd file if necessary, and
- * get the next entry.
- */
-struct passwd *
-getpwent()
-{
- char *fv[MAXFIELD];
- char *p;
- int fc;
-
- /* Open passwd file if not already. */
- if (pw_fp == NULL)
- pw_fp = fopen(pw_file, "r");
- /* Still NULL. No passwd file? */
- if (pw_fp == NULL)
- return PWNULL;
-
-readnext:
- /* Read the next line... */
- if (fgets(pw_line, sizeof(pw_line), pw_fp) == NULL)
- return PWNULL;
-
- /* ...and parse it. */
- p = pw_line;
- fc = 0;
- while (fc < MAXFIELD) {
- fv[fc] = strsep(&p, ":\n");
- if (fv[fc] == NULL)
- break;
- fc++;
- }
-
- /* Need at least 0..5 */
- if (fc < 6)
- goto readnext;
- while (fc < MAXFIELD)
- fv[fc++] = "";
-
- /* Build the pw entry... */
- pw_ent.pw_name = fv[0];
- pw_ent.pw_passwd = fv[1];
- pw_ent.pw_uid = atoi(fv[2]);
- pw_ent.pw_gid = atoi(fv[3]);
- pw_ent.pw_gecos = fv[4];
- pw_ent.pw_dir = fv[5];
- pw_ent.pw_shell = fv[6];
-
- return (&pw_ent);
-}
-
-/* internal for setpwent() */
-int
-setpassent(stayopen)
- int stayopen;
-{
- if (pw_fp)
- rewind(pw_fp);
-}
-
-/* rewind to the beginning. */
-void
-setpwent()
-{
- (void) setpassent(0);
-}
-
-/* done with the passwd file */
-void
-endpwent()
-{
- if (pw_fp) {
- fclose(pw_fp);
- pw_fp = NULL;
- }
-}
-
-struct passwd *
-getpwnam(name)
- const char *name;
-{
- struct passwd *pw;
-
- setpwent();
- while ((pw = getpwent()) != PWNULL)
- if (!strcmp(pw->pw_name, name))
- break;
-
- endpwent();
- return(pw);
-}
-
-struct passwd *
-getpwuid(uid)
- uid_t uid;
-{
- struct passwd *pw;
-
- setpwent();
- while ((pw = getpwent()) != PWNULL)
- if (pw->pw_uid == uid)
- break;
-
- endpwent();
- return(pw);
-}
-
-#ifdef TEST_MAIN
-main() {
- struct passwd *pw;
-
- printf("#name, password, uid, gid, comment, dir, shell\n");
-
- while ((pw = getpwent()) != NULL) {
- printf("%s:%s:", pw->pw_name, pw->pw_passwd);
- printf("%d:%d:", pw->pw_uid, pw->pw_gid);
- printf("%s:", pw->pw_gecos);
- printf("%s:", pw->pw_dir);
- printf("%s\n", pw->pw_shell);
- }
-}
-#endif
diff --git a/distrib/utils/libhack/yplib.c b/distrib/utils/libhack/yplib.c
deleted file mode 100644
index 678de4b8b64..00000000000
--- a/distrib/utils/libhack/yplib.c
+++ /dev/null
@@ -1,223 +0,0 @@
-/* $OpenBSD: yplib.c,v 1.2 2000/03/01 22:10:12 todd Exp $ */
-/* $NetBSD: yplib.c,v 1.1.1.1 1995/10/08 23:08:48 gwr Exp $ */
-
-/*
- * Copyright (c) 1992, 1993 Theo de Raadt <deraadt@fsa.ca>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Theo de Raadt.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * This file provides "stubs" for all the YP library functions.
- * It is not needed unless you pull in things that call YP, and
- * if you use all the get* files here then the YP stuff should
- * not get dragged in. But if it does, one can use this.
- *
- * This was copied from:
- * lib/libc/yp/yplib.c
- * (and then completely gutted! 8^)
- */
-
-#include <sys/types.h>
-
-/* #include <rpcsvc/yp_prot.h> */
-#define YP_TRUE ((long)1) /* general purpose success code */
-#define YP_FALSE ((long)0) /* general purpose failure code */
-
-/* #include <rpcsvc/ypclnt.h> */
-#define YPERR_DOMAIN 3 /* can't bind to a server for domain */
-#define YPERR_YPERR 6 /* some internal YP server or client error */
-#define YPERR_YPBIND 10 /* can't communicate with ypbind */
-#define YPERR_NODOM 12 /* local domain name not set */
-
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-
-static char _yp_domain[256];
-
-int
-_yp_dobind(dom, ypdb)
- const char *dom;
- void **ypdb;
-{
- return YPERR_YPBIND;
-}
-
-int
-yp_bind(dom)
- const char *dom;
-{
- return _yp_dobind(dom, NULL);
-}
-
-void
-yp_unbind(dom)
- const char *dom;
-{
-}
-
-int
-yp_match(indomain, inmap, inkey, inkeylen, outval, outvallen)
- const char *indomain;
- const char *inmap;
- const char *inkey;
- int inkeylen;
- char **outval;
- int *outvallen;
-{
- *outval = NULL;
- *outvallen = 0;
-
- return YPERR_DOMAIN;
-}
-
-int
-yp_get_default_domain(domp)
- char **domp;
-{
- *domp = NULL;
- if (_yp_domain[0] == '\0')
- if (getdomainname(_yp_domain, sizeof(_yp_domain)))
- return YPERR_NODOM;
- *domp = _yp_domain;
- return 0;
-}
-
-int
-yp_first(indomain, inmap, outkey, outkeylen, outval, outvallen)
- const char *indomain;
- const char *inmap;
- char **outkey;
- int *outkeylen;
- char **outval;
- int *outvallen;
-{
-
- *outkey = *outval = NULL;
- *outkeylen = *outvallen = 0;
-
- return YPERR_DOMAIN;
-}
-
-int
-yp_next(indomain, inmap, inkey, inkeylen, outkey, outkeylen, outval, outvallen)
- const char *indomain;
- const char *inmap;
- const char *inkey;
- int inkeylen;
- char **outkey;
- int *outkeylen;
- char **outval;
- int *outvallen;
-{
- *outkey = *outval = NULL;
- *outkeylen = *outvallen = 0;
-
- return YPERR_DOMAIN;
-}
-
-int
-yp_all(indomain, inmap, incallback)
- const char *indomain;
- const char *inmap;
- void *incallback;
-{
- return YPERR_DOMAIN;
-}
-
-int
-yp_order(indomain, inmap, outorder)
- const char *indomain;
- const char *inmap;
- int *outorder;
-{
- return YPERR_DOMAIN;
-}
-
-int
-yp_master(indomain, inmap, outname)
- const char *indomain;
- const char *inmap;
- char **outname;
-{
- return YPERR_DOMAIN;
-}
-
-int
-yp_maplist(indomain, outmaplist)
- const char *indomain;
- struct ypmaplist **outmaplist;
-{
- return YPERR_DOMAIN;
-}
-
-char *
-yperr_string(incode)
- int incode;
-{
- static char err[80];
-
- if (incode == 0)
- return "Success";
-
- sprintf(err, "YP FAKE error %d\n", incode);
- return err;
-}
-
-int
-ypprot_err(incode)
- unsigned int incode;
-{
- switch (incode) {
- case YP_TRUE: /* success */
- return 0;
- case YP_FALSE: /* failure */
- return YPERR_YPBIND;
- }
- return YPERR_YPERR;
-}
-
-int
-_yp_check(dom)
- char **dom;
-{
- char *unused;
-
- if (_yp_domain[0] == '\0')
- if (yp_get_default_domain(&unused))
- return 0;
-
- if (dom)
- *dom = _yp_domain;
-
- if (yp_bind(_yp_domain) == 0)
- return 1;
- return 0;
-}
diff --git a/distrib/utils/ssh/Makefile b/distrib/utils/ssh/Makefile
deleted file mode 100644
index 4faa4ab8c74..00000000000
--- a/distrib/utils/ssh/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-# $OpenBSD: Makefile,v 1.2 2000/03/01 22:10:12 todd Exp $
-# $NetBSD: Makefile,v 1.1.1.1 1995/10/08 23:08:46 gwr Exp $
-# Small Shell (i.e. for boot media)
-
-PROG= ssh
-NOMAN=
-
-all: ${PROG}
-
-.include <bsd.prog.mk>
diff --git a/distrib/utils/ssh/ssh.c b/distrib/utils/ssh/ssh.c
deleted file mode 100644
index 909f542bf8f..00000000000
--- a/distrib/utils/ssh/ssh.c
+++ /dev/null
@@ -1,609 +0,0 @@
-/* $OpenBSD: ssh.c,v 1.2 2000/03/01 22:10:12 todd Exp $ */
-/* $NetBSD: ssh.c,v 1.1.1.1 1995/10/08 23:08:46 gwr Exp $ */
-
-/*
- * Copyright (c) 1995 Gordon W. Ross
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- * 4. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Gordon W. Ross
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Small Shell - Nothing fancy. Just runs programs.
- * The RAMDISK root uses this to save space.
- */
-
-#include <errno.h>
-#include <fcntl.h>
-#include <setjmp.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/param.h>
-#include <sys/wait.h>
-
-/* XXX - SunOS hacks... */
-#ifndef WCOREDUMP
-#define WCOREDUMP(x) ((x) & 0200)
-#endif
-
-#ifndef __P
-#ifdef __STDC__
-#define __P(x) x
-#else /* STDC */
-#define __P(x) ()
-#endif /* STDC */
-#endif /* __P */
-
-extern char *optarg;
-extern int optind, opterr;
-
-#define MAXLINE 256
-#define MAXARGS 32
-
-#define MAXPATH 256
-char cur_path[MAXPATH] = "PATH=/bin:/usr/bin";
-
-char rc_name[] = ".sshrc";
-char *prompt = "ssh: ";
-
-int eflag; /* exit on cmd failure */
-int iflag; /* interactive mode (catch interrupts) */
-int sflag; /* read from stdin (ignore file arg) */
-int xflag; /* execution trace */
-
-/* Command file: name, line number, arg count, arg vector */
-char *cf_name;
-int cf_line;
-int cf_argc;
-char **cf_argv;
-
-int def_omode = 0666;
-int run_bg_pid;
-
-jmp_buf next_cmd;
-
-void catchsig __P((int sig));
-void child_newfd __P((int setfd, char *file, int otype));
-int find_in_path __P((char *cmd, char *filebuf));
-void print_termsig __P((FILE *fp, int cstat));
-int runfile __P((FILE *fp));
-
-
-main(argc, argv)
- int argc;
- char **argv;
-{
- struct sigaction sa;
- FILE *cfp; /* command file ptr */
- int c, sig;
- int error = 0;
-
- while ((c = getopt(argc, argv, "eisx")) != -1) {
- switch (c) {
- case 'e':
- eflag++;
- break;
- case 'i':
- eflag++;
- break;
- case 's':
- sflag++;
- break;
- case 'x':
- xflag++;
- break;
- case '?':
- error++;
- break;
- }
- }
- if (error) {
- fprintf(stderr, "usage: ssh [-eisx] [cmd_file [...]]\n");
- exit(1);
- }
- cf_argc = argc - optind;
- cf_argv = &argv[optind];
-
- /* If this is a login shell, run the rc file. */
- if (argv[0] && argv[0][0] == '-') {
- cf_line = 0;
- cf_name = rc_name;
- if ((cfp = fopen(cf_name, "r")) != NULL) {
- error = runfile(cfp);
- fclose(cfp);
- }
- }
-
- /* If no file names, read commands from stdin. */
- if (cf_argc == 0)
- sflag++;
- /* If stdin is a tty, be interactive. */
- if (sflag && isatty(fileno(stdin)))
- iflag++;
-
- /* Maybe run a command file... */
- if (!sflag && cf_argc) {
- cf_line = 0;
- cf_name = cf_argv[0];
- cfp = fopen(cf_name, "r");
- if (cfp == NULL) {
- perror(cf_name);
- exit(1);
- }
- error = runfile(cfp);
- fclose(cfp);
- exit(error);
- }
-
- /* Read commands from stdin. */
- cf_line = 0;
- cf_name = "(stdin)";
- if (iflag) {
- eflag = 0; /* don't kill shell on error. */
- sig = setjmp(next_cmd);
- if (sig == 0) {
- /* Initialization... */
- sa.sa_handler = catchsig;
- sa.sa_flags = 0;
- sigemptyset(&sa.sa_mask);
- sigaction(SIGINT, &sa, NULL);
- sigaction(SIGQUIT, &sa, NULL);
- sigaction(SIGTERM, &sa, NULL);
- } else {
- /* Got here via longjmp. */
- fprintf(stderr, " signal %d\n", sig);
- sigemptyset(&sa.sa_mask);
- sigprocmask(SIG_SETMASK, &sa.sa_mask, NULL);
- }
- }
- error = runfile(stdin);
- exit (error);
-}
-
-void
-catchsig(sig)
- int sig;
-{
- longjmp(next_cmd, sig);
-}
-
-/*
- * Run command from the passed stdio file pointer.
- * Returns exit status.
- */
-int
-runfile(cfp)
- FILE *cfp;
-{
- char ibuf[MAXLINE];
- char *argv[MAXARGS];
- char *p;
- int i, argc, exitcode, cpid, cstat;
-
- /* The command loop. */
- exitcode = 0;
- for (;;) {
- if (iflag) {
- fprintf(stderr, prompt);
- fflush(stderr);
- }
-
- if ((fgets(ibuf, sizeof(ibuf), cfp)) == NULL)
- break;
- cf_line++;
-
- argc = 0;
- p = ibuf;
-
- while (argc < MAXARGS-1) {
- /* skip blanks or tabs */
- while ((*p == ' ') || (*p == '\t')) {
- next_token:
- *p++ = '\0';
- }
- /* end of line? */
- if ((*p == '\n') || (*p == '#')) {
- *p = '\0';
- break; /* to eol */
- }
- if (*p == '\0')
- break;
- /* save start of token */
- argv[argc++] = p;
- /* find end of token */
- while (*p) {
- if ((*p == '\n') || (*p == '#')) {
- *p = '\0';
- goto eol;
- }
- if ((*p == ' ') || (*p == '\t'))
- goto next_token;
- p++;
- }
- }
- eol:
-
- if (argc > 0) {
- if (xflag) {
- fprintf(stderr, "x");
- for (i = 0; i < argc; i++) {
- fprintf(stderr, " %s", argv[i]);
- }
- fprintf(stderr, "\n");
- }
- argv[argc] = NULL;
- exitcode = cmd_eval(argc, argv);
- }
-
- /* Collect children. */
- while ((cpid = waitpid(0, &cstat, WNOHANG)) > 0) {
- if (iflag) {
- fprintf(stderr, "[%d] ", cpid);
- if (WTERMSIG(cstat)) {
- print_termsig(stderr, cstat);
- } else {
- fprintf(stderr, "Exited, status %d\n",
- WEXITSTATUS(cstat));
- }
- }
- }
-
- if (exitcode && eflag)
- break;
- }
- /* return status of last command */
- return (exitcode);
-}
-
-
-/****************************************************************
- * Table of buildin commands
- * for cmd_eval() to search...
- ****************************************************************/
-
-struct cmd {
- char *name;
- int (*func)();
- char *help;
-};
-struct cmd cmd_table[];
-
-/*
- * Evaluate a command named as argv[0]
- * with arguments argv[1],argv[2]...
- * Returns exit status.
- */
-int
-cmd_eval(argc, argv)
- int argc;
- char **argv;
-{
- struct cmd *cp;
-
- /*
- * Do linear search for a builtin command.
- * Performance does not matter here.
- */
- for (cp = cmd_table; cp->name; cp++) {
- if (!strcmp(cp->name, argv[0])) {
- /* Pass only args to builtin. */
- --argc; argv++;
- return (cp->func(argc, argv));
- }
- }
-
- /*
- * If no matching builtin, let "run ..."
- * have a chance to try an external.
- */
- return (cmd_run(argc, argv));
-}
-
-/*****************************************************************
- * Here are the actual commands. For these,
- * the command name has been skipped, so
- * argv[0] is the first arg (if any args).
- * All return an exit status.
- ****************************************************************/
-
-char help_cd[] = "cd [dir]";
-
-int
-cmd_cd(argc, argv)
- int argc;
- char **argv;
-{
- char *dir;
- int err;
-
- if (argc > 0)
- dir = argv[0];
- else {
- dir = getenv("HOME");
- if (dir == NULL)
- dir = "/";
- }
- if (chdir(dir)) {
- perror(dir);
- return (1);
- }
- return(0);
-}
-
-char help_exit[] = "exit [n]";
-
-int
-cmd_exit(argc, argv)
- int argc;
- char **argv;
-{
- int val = 0;
-
- if (argc > 0)
- val = atoi(argv[0]);
- exit(val);
-}
-
-char help_help[] = "help [command]";
-
-int
-cmd_help(argc, argv)
- int argc;
- char **argv;
-{
- struct cmd *cp;
-
- if (argc > 0) {
- for (cp = cmd_table; cp->name; cp++) {
- if (!strcmp(cp->name, argv[0])) {
- printf("usage: %s\n", cp->help);
- return (0);
- }
- }
- printf("%s: no such command\n", argv[0]);
- }
-
- printf("Builtin commands: ");
- for (cp = cmd_table; cp->name; cp++) {
- printf(" %s", cp->name);
- }
- printf("\nFor specific usage: help [command]\n");
- return (0);
-}
-
-char help_path[] = "path [dir1:dir2:...]";
-
-int
-cmd_path(argc, argv)
- int argc;
- char **argv;
-{
- int i;
-
- if (argc <= 0) {
- printf("%s\n", cur_path);
- return(0);
- }
-
- strncpy(cur_path+5, argv[0], MAXPATH-6);
- putenv(cur_path);
-
- return (0);
-}
-
-/*****************************************************************
- * The "run" command is the big one.
- * Does fork/exec/wait, redirection...
- * Returns exit status of child
- * (or zero for a background job)
- ****************************************************************/
-
-char help_run[] = "\
-run [-bg] [-i ifile] [-o ofile] [-e efile] program [args...]\n\
-or simply: program [args...]";
-
-int
-cmd_run(argc, argv)
- int argc;
- char **argv;
-{
- struct sigaction sa;
- int pid, err, cstat, fd;
- char file[MAXPATHLEN];
- int background;
- char *opt, *ifile, *ofile, *efile;
- extern char **environ;
-
- /*
- * Parse options:
- * -b : background
- * -i : input file
- * -o : output file
- * -e : error file
- */
- background = 0;
- ifile = ofile = efile = NULL;
- while ((argc > 0) && (argv[0][0] == '-')) {
- opt = argv[0];
- --argc; argv++;
- switch (opt[1]) {
- case 'b':
- background++;
- break;
- case 'i':
- ifile = argv[0];
- goto shift;
- case 'o':
- ofile = argv[0];
- goto shift;
- case 'e':
- efile = argv[0];
- goto shift;
- default:
- fprintf(stderr, "run %s: bad option\n", opt);
- return (1);
- shift:
- --argc; argv++;
- }
- }
-
- if (argc <= 0) {
- fprintf(stderr, "%s:%d run: missing command\n",
- cf_name, cf_line);
- return (1);
- }
-
- /* Commands containing '/' get no path search. */
- if (strchr(argv[0], '/')) {
- strncpy(file, argv[0], sizeof(file)-1);
- if (access(file, X_OK)) {
- perror(file);
- return (1);
- }
- } else {
- if (find_in_path(argv[0], file)) {
- fprintf(stderr, "%s: command not found\n", argv[0]);
- return (1);
- }
- }
-
- pid = fork();
- if (pid == 0) {
- /* child runs this */
- /* handle redirection options... */
- if (ifile)
- child_newfd(0, ifile, O_RDONLY);
- if (ofile)
- child_newfd(1, ofile, O_WRONLY|O_CREAT);
- if (efile)
- child_newfd(2, efile, O_WRONLY|O_CREAT);
- if (background) {
- /* Ignore SIGINT, SIGQUIT */
- sa.sa_handler = SIG_IGN;
- sa.sa_flags = 0;
- sigemptyset(&sa.sa_mask);
- sigaction(SIGINT, &sa, NULL);
- sigaction(SIGQUIT, &sa, NULL);
- }
- err = execve(file, argv, environ);
- perror(argv[0]);
- return (1);
- }
- /* parent */
- /* Handle background option... */
- if (background) {
- fprintf(stderr, "[%d]\n", pid);
- run_bg_pid = pid;
- return (0);
- }
- if (waitpid(pid, &cstat, 0) < 0) {
- perror("waitpid");
- return (1);
- }
- if (WTERMSIG(cstat)) {
- print_termsig(stderr, cstat);
- }
- return (WEXITSTATUS(cstat));
-}
-
-/*****************************************************************
- * table of builtin commands
- ****************************************************************/
-struct cmd cmd_table[] = {
- { "cd", cmd_cd, help_cd },
- { "exit", cmd_exit, help_exit },
- { "help", cmd_help, help_help },
- { "path", cmd_path, help_path },
- { "run", cmd_run, help_run },
- { 0 },
-};
-
-/*****************************************************************
- * helper functions for the "run" command
- ****************************************************************/
-
-int
-find_in_path(cmd, filebuf)
- char *cmd;
- char *filebuf;
-{
- char *dirp, *endp, *bufp; /* dir, end */
-
- dirp = cur_path + 5;
- while (*dirp) {
- endp = dirp;
- bufp = filebuf;
- while (*endp && (*endp != ':'))
- *bufp++ = *endp++;
- *bufp++ = '/';
- strcpy(bufp, cmd);
- if (access(filebuf, X_OK) == 0)
- return (0);
- if (*endp == ':')
- endp++;
- dirp = endp; /* next dir */
- }
- return (-1);
-}
-
-/*
- * Set the file descriptor SETFD to FILE,
- * which was opened with OTYPE and MODE.
- */
-void
-child_newfd(setfd, file, otype)
- int setfd; /* what to set (i.e. 0,1,2) */
- char *file;
- int otype; /* O_RDONLY, etc. */
-{
- int newfd;
-
- close(setfd);
- if ((newfd = open(file, otype, def_omode)) < 0) {
- perror(file);
- exit(1);
- }
- if (newfd != setfd) {
- dup2(newfd, setfd);
- close(newfd);
- }
-}
-
-void
-print_termsig(fp, cstat)
- FILE *fp;
- int cstat;
-{
- fprintf(fp, "Terminated, signal %d",
- WTERMSIG(cstat));
- if (WCOREDUMP(cstat))
- fprintf(fp, " (core dumped)");
- fprintf(fp, "\n");
-}
diff --git a/distrib/utils/tls/Makefile b/distrib/utils/tls/Makefile
deleted file mode 100644
index 8bbb66945c7..00000000000
--- a/distrib/utils/tls/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-# $OpenBSD: Makefile,v 1.2 2000/03/01 22:10:12 todd Exp $
-# $NetBSD: Makefile,v 1.1.1.1 1995/10/08 23:08:47 gwr Exp $
-# Tiny ls (i.e. for boot media)
-
-PROG= tls
-NOMAN=
-
-all: ${PROG}
-
-.include <bsd.prog.mk>
diff --git a/distrib/utils/tls/tls.c b/distrib/utils/tls/tls.c
deleted file mode 100644
index 57340e89169..00000000000
--- a/distrib/utils/tls/tls.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/* $OpenBSD: tls.c,v 1.2 2000/03/01 22:10:13 todd Exp $ */
-/* $NetBSD: tls.c,v 1.1.1.1 1995/10/08 23:08:47 gwr Exp $ */
-
-/*
- * Copyright (c) 1995 Gordon W. Ross
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- * 4. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Gordon W. Ross
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <dirent.h>
-#include <stdio.h>
-#include <time.h>
-
-int iflag;
-
-void show_long(char *fname);
-
-main(argc, argv)
- int argc;
- char **argv;
-{
- DIR *dfp;
- struct dirent *d;
-
- /* If given an arg, just cd there first. */
- if (argc > 1) {
- if (chdir(argv[1])) {
- perror(argv[1]);
- exit(1);
- }
- }
- if (argc > 2)
- fprintf(stderr, "extra args ignored\n");
-
- dfp = opendir(".");
- if (dfp == NULL) {
- perror("opendir");
- return;
- }
-
- while ((d = readdir(dfp)) != NULL)
- show_long(d->d_name);
-
- closedir(dfp);
- exit(0);
-}
-
-/* XXX - This is system dependent... */
-char ifmt_name[16] = {
- '?', /* 0: nothing */
- 'P', /* 1: fifo (pipe) */
- 'C', /* 2: chr device */
- '?', /* 3: ? */
- 'D', /* 4: dir */
- '?', /* 5: ? */
- 'B', /* 6: blk device */
- '?', /* 7: ? */
- 'F', /* 8: file */
- '?', /* 9: ? */
- 'L', /* A: link */
- '?', /* B: ? */
- 'S', /* C: socket */
- '?', /* D: ? */
- 'W', /* E: whiteout */
- '?' /* F: ? */
-};
-
-void
-show_long(fname)
- char *fname;
-{
- struct stat st;
- int ifmt;
- char ifmt_c;
- char *date;
-
- if (lstat(fname, &st)) {
- perror(fname);
- return;
- }
- ifmt = (st.st_mode >> 12) & 15;
- ifmt_c = ifmt_name[ifmt];
-
- if (iflag) {
- /* inode number */
- printf("%6d ", st.st_ino);
- }
-
- /* fmt/mode */
- printf("%c:", ifmt_c);
- printf("%04o ", st.st_mode & 07777);
-
- /* nlinks, uid, gid */
- printf("%2d ", st.st_nlink);
- printf("%4d ", st.st_uid);
- printf("%4d ", st.st_gid);
-
- /* size or major/minor */
- if ((ifmt_c == 'B') || (ifmt_c == 'C')) {
- printf("%2d, ", major(st.st_rdev));
- printf("%3d ", minor(st.st_rdev));
- } else {
- printf("%7d ", (int) st.st_size);
- }
-
- /* date */
- date = ctime(&st.st_mtime);
- date += 4; /* skip day-of-week */
- date[12] = '\0'; /* to the minute */
- printf("%s ", date);
-
- /* name */
- printf("%s", fname);
-
- if (ifmt_c == 'L') {
- char linkto[256];
- int n;
-
- n = readlink(fname, linkto, sizeof(linkto)-1);
- if (n < 0) {
- perror(fname);
- return;
- }
- linkto[n] = '\0';
- printf(" -> %s", linkto);
- }
- printf("\n");
-}
diff --git a/distrib/utils/x_ifconfig/Makefile b/distrib/utils/x_ifconfig/Makefile
deleted file mode 100644
index 3dadc5af038..00000000000
--- a/distrib/utils/x_ifconfig/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-# $OpenBSD: Makefile,v 1.3 2000/03/01 22:10:13 todd Exp $
-# $NetBSD: Makefile,v 1.4 1996/03/27 04:48:46 scottr Exp $
-# Build a smaller ifconfig (i.e. for boot media)
-
-PROG= ifconfig
-NOMAN=
-
-SRCDIR= ${.CURDIR}/../../../sbin/ifconfig
-CFLAGS+= -DINET_ONLY -I${SRCDIR}
-
-all: ${PROG}
-
-.include <bsd.prog.mk>
-
-.PATH: ${SRCDIR}