summaryrefslogtreecommitdiff
path: root/distrib/amiga
diff options
context:
space:
mode:
Diffstat (limited to 'distrib/amiga')
-rw-r--r--distrib/amiga/floppies/Makefile5
-rw-r--r--distrib/amiga/floppies/Makefile.inc4
-rw-r--r--distrib/amiga/floppies/inst-common/Makefile.inc48
-rw-r--r--distrib/amiga/floppies/inst-common/dot.commonutils123
-rw-r--r--distrib/amiga/floppies/inst-common/instbin.conf24
-rw-r--r--distrib/amiga/floppies/inst-common/list76
-rw-r--r--distrib/amiga/floppies/inst-common/mtree.conf72
-rw-r--r--distrib/amiga/floppies/inst-common/termcap.vt64
-rw-r--r--distrib/amiga/floppies/inst/Makefile8
-rw-r--r--distrib/amiga/floppies/inst/disktab.preinstall29
-rw-r--r--distrib/amiga/floppies/inst/dot.instutils152
-rw-r--r--distrib/amiga/floppies/inst/dot.profile56
-rw-r--r--distrib/amiga/floppies/inst/install.sh291
-rw-r--r--distrib/amiga/floppies/inst/list10
-rw-r--r--distrib/amiga/floppies/list2sh.awk39
-rw-r--r--distrib/amiga/floppies/runlist.sh13
-rw-r--r--distrib/amiga/floppies/upgr/Makefile8
-rw-r--r--distrib/amiga/floppies/upgr/dot.hdprofile62
-rw-r--r--distrib/amiga/floppies/upgr/dot.profile56
-rw-r--r--distrib/amiga/floppies/upgr/dot.upgrutils54
-rw-r--r--distrib/amiga/floppies/upgr/list7
-rw-r--r--distrib/amiga/floppies/upgr/upgrade.sh283
22 files changed, 1484 insertions, 0 deletions
diff --git a/distrib/amiga/floppies/Makefile b/distrib/amiga/floppies/Makefile
new file mode 100644
index 00000000000..ecbc7cc99e3
--- /dev/null
+++ b/distrib/amiga/floppies/Makefile
@@ -0,0 +1,5 @@
+# $Id
+
+SUBDIR= inst upgr
+
+.include <bsd.subdir.mk>
diff --git a/distrib/amiga/floppies/Makefile.inc b/distrib/amiga/floppies/Makefile.inc
new file mode 100644
index 00000000000..f39164f80cc
--- /dev/null
+++ b/distrib/amiga/floppies/Makefile.inc
@@ -0,0 +1,4 @@
+# $Id: Makefile.inc,v 1.1 1995/10/18 08:37:27 deraadt Exp $
+
+# Revision is 1.1
+REV= 11
diff --git a/distrib/amiga/floppies/inst-common/Makefile.inc b/distrib/amiga/floppies/inst-common/Makefile.inc
new file mode 100644
index 00000000000..b84e5a2356d
--- /dev/null
+++ b/distrib/amiga/floppies/inst-common/Makefile.inc
@@ -0,0 +1,48 @@
+# $Id: Makefile.inc,v 1.1 1995/10/18 08:37:28 deraadt Exp $
+
+# TOP is assumed to be defined by Makefile including this one.
+
+CBIN= instbin
+COMMONDIR= ${TOP}/inst-common
+
+MOUNT_POINT?= /mnt
+VND?= vnd0
+VND_DEV= /dev/${VND}c
+VND_RDEV= /dev/r${VND}c
+IMAGE?= xxx-${REV}.fs
+MDEC= ${DESTDIR}/usr/mdec
+
+LISTS= ${COMMONDIR}/list ${.CURDIR}/list
+CRUNCHCONF= ${COMMONDIR}/${CBIN}.conf
+MTREE= ${COMMONDIR}/mtree.conf
+
+all: ${CBIN}
+ dd if=/dev/zero of=${IMAGE} bs=80k count=22
+ vnconfig -v -c ${VND_DEV} ${IMAGE}
+ newfs -O -m 0 -o space ${VND_RDEV} floppyhd
+ mount ${VND_DEV} ${MOUNT_POINT}
+ 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}
+ vnconfig -u ${VND_DEV}
+
+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
+
+clean cleandir:
+ /bin/rm -f core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache *.o *.lo *.c
+
+.include <bsd.obj.mk>
+.include <bsd.subdir.mk>
diff --git a/distrib/amiga/floppies/inst-common/dot.commonutils b/distrib/amiga/floppies/inst-common/dot.commonutils
new file mode 100644
index 00000000000..d5a87c3a2b9
--- /dev/null
+++ b/distrib/amiga/floppies/inst-common/dot.commonutils
@@ -0,0 +1,123 @@
+#
+# 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.
+#
+# $Id: dot.commonutils,v 1.1 1995/10/18 08:37:28 deraadt Exp $
+
+# 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 "installation"
+ 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=
+ while [ "$which" != "a" -a "$which" != "b" ]; do
+ echo -n "Read from which floppy drive ('a' or 'b')? [a] "
+ read which
+ if [ "X$which" = "X" ]; then
+ which=a
+ fi
+ done
+ while echo -n "Insert floppy (hit ^C to terminate, enter to load): "
+ do
+ mount -t msdos /dev/fd0$which /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 xvpf --unlink /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 -)
+}
diff --git a/distrib/amiga/floppies/inst-common/instbin.conf b/distrib/amiga/floppies/inst-common/instbin.conf
new file mode 100644
index 00000000000..38214376467
--- /dev/null
+++ b/distrib/amiga/floppies/inst-common/instbin.conf
@@ -0,0 +1,24 @@
+#
+# kcbin.conf - unified binary for the kc floppy
+# $Id: instbin.conf,v 1.1 1995/10/18 08:37:28 deraadt Exp $
+#
+
+srcdirs bin sbin usr.bin usr.sbin gnu/usr.bin
+
+progs cat chmod chown chroot cp dd df disklabel ed expr fsck ftp
+progs gzip ifconfig init ln ls mkdir mknod more mount mount_cd9660
+progs mount_ados mount_ffs mount_nfs mv newfs printf pppd pwd reboot rm
+progs route sed sh shutdown slattach strings stty sync tar test tip
+progs umount update
+
+ln chown chgrp
+ln gzip gzcat gunzip
+ln mount_ados ados
+ln mount_cd9660 cd9660
+ln mount_ffs ffs
+ln mount_nfs nfs
+ln reboot halt
+ln sh -sh # init invokes the shell this way
+ln test [
+
+libs -ledit -lutil -ltermcap -lcrypt -ll -lm
diff --git a/distrib/amiga/floppies/inst-common/list b/distrib/amiga/floppies/inst-common/list
new file mode 100644
index 00000000000..0feda25a64d
--- /dev/null
+++ b/distrib/amiga/floppies/inst-common/list
@@ -0,0 +1,76 @@
+# $Id: list,v 1.1 1995/10/18 08:37:28 deraadt Exp $
+
+# copy the crunched binary, link to it, and kill it
+COPY ${OBJDIR}/instbin instbin
+LINK instbin bin/cat
+LINK instbin bin/chmod
+LINK instbin bin/cp
+LINK instbin bin/df
+LINK instbin bin/dd
+LINK instbin bin/ed
+LINK instbin bin/expr
+LINK instbin bin/ln
+LINK instbin bin/ls
+LINK instbin bin/mkdir
+LINK instbin bin/mv
+LINK instbin bin/pwd
+LINK instbin bin/rm
+LINK instbin bin/sh
+LINK instbin bin/-sh
+LINK instbin bin/stty
+LINK instbin bin/sync
+LINK instbin bin/test
+LINK instbin bin/[
+LINK instbin sbin/disklabel
+LINK instbin sbin/fsck
+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_ados
+LINK instbin sbin/mount_ffs
+LINK instbin sbin/mount_nfs
+LINK instbin sbin/newfs
+LINK instbin sbin/reboot
+LINK instbin sbin/route
+LINK instbin sbin/shutdown
+LINK instbin sbin/slattach
+LINK instbin sbin/umount
+LINK instbin usr/bin/chgrp
+LINK instbin usr/bin/ftp
+LINK instbin usr/bin/gunzip
+LINK instbin usr/bin/gzcat
+LINK instbin usr/bin/gzip
+LINK instbin usr/bin/more
+LINK instbin usr/bin/printf
+LINK instbin usr/bin/sed
+LINK instbin usr/bin/strings
+LINK instbin usr/bin/tar
+LINK instbin usr/bin/tip
+LINK instbin usr/sbin/chown
+LINK instbin usr/sbin/chroot
+LINK instbin usr/sbin/pppd
+LINK instbin usr/sbin/update
+SPECIAL /bin/rm instbin
+
+# 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 ${DESTDIR}/etc/group etc
+COPY ${DESTDIR}/etc/master.passwd etc
+COPY ${DESTDIR}/etc/passwd etc
+COPY ${DESTDIR}/etc/protocols etc
+COPY ${DESTDIR}/etc/pwd.db etc
+COPY ${DESTDIR}/etc/services etc
+COPY ${DESTDIR}/etc/spwd.db etc
+
+# and the common installation tools
+COPY ${TOPDIR}/inst-common/dot.commonutils .commonutils
+COPY ${TOPDIR}/inst-common/termcap.vt usr/share/misc/termcap
diff --git a/distrib/amiga/floppies/inst-common/mtree.conf b/distrib/amiga/floppies/inst-common/mtree.conf
new file mode 100644
index 00000000000..c0395984ec0
--- /dev/null
+++ b/distrib/amiga/floppies/inst-common/mtree.conf
@@ -0,0 +1,72 @@
+# $Id: mtree.conf,v 1.1 1995/10/18 08:37:28 deraadt Exp $
+
+/set type=dir uname=root gname=wheel mode=0755
+# .
+.
+
+# ./bin
+bin
+# ./bin
+..
+
+# ./dev
+dev
+# ./dev
+..
+
+# ./etc
+etc
+# ./etc
+..
+
+# ./mnt
+mnt
+# ./mnt
+..
+
+# ./mnt2
+mnt2
+# ./mnt2
+..
+
+# ./sbin
+sbin
+# ./sbin
+..
+
+# ./tmp
+tmp
+# ./tmp
+..
+
+# ./usr
+usr
+
+# ./usr/bin
+bin
+# ./usr/bin
+..
+
+# ./usr/mdec
+mdec
+# ./usr/mdec
+..
+
+# ./usr/sbin
+sbin
+# ./usr/sbin
+..
+
+# ./usr/share
+share
+
+# ./usr/share/misc
+misc
+# ./usr/share/misc
+..
+
+# ./usr/share
+..
+
+# ./usr
+..
diff --git a/distrib/amiga/floppies/inst-common/termcap.vt b/distrib/amiga/floppies/inst-common/termcap.vt
new file mode 100644
index 00000000000..b885de9d0a6
--- /dev/null
+++ b/distrib/amiga/floppies/inst-common/termcap.vt
@@ -0,0 +1,64 @@
+# Copyright (c) 1980, 1985, 1989 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.
+#
+# @(#)termcap.src 5.109 (Berkeley) 3/8/93
+#
+vt200|vt220|dec-vt220|vt200-js|vt220-js|dec vt200 series with jump scroll:\
+ :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:LE=\E[%dD:\
+ :RI=\E[%dC:UP=\E[%dA:ae=^O:al=\E[L:as=^N:ct=\E[3g:dc=\E[P:dl=\E[M:\
+ :ei=\E[4l:im=\E[4h:k1=\E[17~:k2=\E[18~:k3=\E[19~:k4=\E[20~:\
+ :k5=\E[21~:k6=\E[23~:k7=\E[24~:k8=\E[25~:kD=\E[3~:kH=\E[4~:\
+ :kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=\177:kh=\E[1~:km:mi:ms:\
+ :if=/usr/share/tabset/vt100:se=\E[27m:st=\EH:ue=\E[24m:\
+ :tc=vt100:
+vt100|dec-vt100|vt100-am|vt100am|dec vt100:\
+ :bl=^G:cr=^M:it#8:\
+ :do=^J:co#80:li#24:cl=50\E[;H\E[2J:sf=2*\ED:\
+ :le=^H:bs:am:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:cb=3\E[1K:\
+ :ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:\
+ :md=2\E[1m:mr=2\E[7m:mb=2\E[5m:me=2\E[m:is=\E[1;24r\E[24;1H:\
+ :if=/usr/share/tabset/vt100:\
+ :rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:ks=\E[?1h\E=:ke=\E[?1l\E>:\
+ :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\
+ :ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=2*\EM:vt#3:xn:\
+ :sc=\E7:rc=\E8:cs=\E[%i%d;%dr:
+vt300|vt320|vt300-80|VT 300 with 80 columns, on VMS:\
+ :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\
+ :LE=\E[%dD:RI=\E[%dC:SR=1*\E[%dM:UP=\E[%dA:al=\E[L:\
+ :am:bl=^G:bs:cd=2*\E[J:ce=2*\E[K:cl=45\E[H\E[2J:\
+ :cm=%i\E[%d;%dH:co#80:cr=\r:cs=\E[%i%d;%dr:ct=\E[3g:\
+ :dc=\E[P:dl=\E[M:dm=:do=\ED:ec=\E[%dX:ed=:ei=\E[4l:\
+ :ho=\E[H:ic:im=\E[4h:it#8:k1=\EOP:k2=\EOQ:k3=\EOR:\
+ :k4=\EOS:kd=\E[B:ke=\E[?1l\E>:kl=\E[D:kn#4:kr=\E[C:ks=\E[?1h\E=:\
+ :ku=\E[A:le=^H:li#24:mb=\E[5m:md=\E[1m:me=\E[0m:mi:\
+ :mr=\E[7m:ms:nd=\E[C:nl=\ED:nw=\EE:pf=\E[?4i:po=\E[?5i:\
+ :ps=\E[i:rc=\E8:sc=\E7:se=\E[27m:sf=1*\ED:so=\E[7m:\
+ :sr=1*\EM:st=\EH:ue=\E[24m:up=\EM:us=\E[4m:xn:
diff --git a/distrib/amiga/floppies/inst/Makefile b/distrib/amiga/floppies/inst/Makefile
new file mode 100644
index 00000000000..47d65f599e2
--- /dev/null
+++ b/distrib/amiga/floppies/inst/Makefile
@@ -0,0 +1,8 @@
+# $Id: Makefile,v 1.1 1995/10/18 08:37:28 deraadt Exp $
+
+TOP= ${.CURDIR}/..
+
+.include "${TOP}/Makefile.inc"
+IMAGE= inst-${REV}.fs
+
+.include "${TOP}/inst-common/Makefile.inc"
diff --git a/distrib/amiga/floppies/inst/disktab.preinstall b/distrib/amiga/floppies/inst/disktab.preinstall
new file mode 100644
index 00000000000..5fe26a7d81c
--- /dev/null
+++ b/distrib/amiga/floppies/inst/disktab.preinstall
@@ -0,0 +1,29 @@
+# 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/amiga/floppies/inst/dot.instutils b/distrib/amiga/floppies/inst/dot.instutils
new file mode 100644
index 00000000000..8673f302988
--- /dev/null
+++ b/distrib/amiga/floppies/inst/dot.instutils
@@ -0,0 +1,152 @@
+#
+# 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.
+#
+# $Id: dot.instutils,v 1.1 1995/10/18 08:37:28 deraadt Exp $
+
+# 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=/mnt/dev
+ ETC=/mnt/etc
+
+ 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 /mnt/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. ae0, ed0, le0, or es0)? "
+ 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 "All that's left to do now is to install the NetBSD kernel on"
+ echo "your hard disk. You should now halt your machine using the"
+ echo "'halt' command. Once the machine is halted, reboot it"
+}
diff --git a/distrib/amiga/floppies/inst/dot.profile b/distrib/amiga/floppies/inst/dot.profile
new file mode 100644
index 00000000000..bd4403e004c
--- /dev/null
+++ b/distrib/amiga/floppies/inst/dot.profile
@@ -0,0 +1,56 @@
+#
+# 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.
+#
+# $Id: dot.profile,v 1.1 1995/10/18 08:37:28 deraadt Exp $
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
+export PATH
+TERM=vt100
+export TERM
+
+umask 022
+
+if [ "X${DONEPROFILE}" = "X" ]; then
+ DONEPROFILE=YES
+
+ # 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
+ . /.instutils
+
+ # run the installation script.
+ install
+fi
diff --git a/distrib/amiga/floppies/inst/install.sh b/distrib/amiga/floppies/inst/install.sh
new file mode 100644
index 00000000000..4ff607482d8
--- /dev/null
+++ b/distrib/amiga/floppies/inst/install.sh
@@ -0,0 +1,291 @@
+#!/bin/sh
+#
+# 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.
+#
+# $Id: install.sh,v 1.1 1995/10/18 08:37:28 deraadt Exp $
+
+# NetBSD installation script.
+# In a perfect world, this would be a nice C program, with a reasonable
+# user interface.
+
+FSTABDIR=/mnt/etc # /mnt/etc
+#DONTDOIT==echo
+
+VERSION=1.1
+FSTAB=${FSTABDIR}/fstab
+
+getresp() {
+ read resp
+ if [ "X$resp" = "X" ]; then
+ resp=$1
+ fi
+}
+
+getvar() {
+ echo $(eval $(echo "echo \$$1"))
+}
+
+shiftvar() {
+ local - var
+ var="$1"
+ list="$(getvar $var)"
+ set -- $list
+ shift
+ setvar $var "$*"
+}
+
+getparts() {
+ disklabel $1 2>/dev/null | sed -e '/^[ ][ ][ad-p]/!d' |
+ sed -e 's,^[ ]*\([a-p]\):[ ]*[0-9]*[ ]*[0-9]*[ ][ ]*\([a-zA-Z0-9.]*\).*,\1 \2,' |
+ sed -e ':a
+ N;${s/\n/ /g;p;d;}
+ ba'
+}
+
+getdrives() {
+ local du thispart
+ for du in /dev/r${drivetype}?a; do
+ dd if=$du of=/dev/null bs=1b count=1 >/dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ thisunit=`echo $du | sed -e 's,/dev/r\(...\)a,\1,g'`
+ driveunits="$driveunits $thisunit"
+ else
+ continue;
+ fi
+ setvar $thisunit "$(getparts $thisunit)"
+ export $thisunit
+ done
+ export drivenunits
+}
+
+prepdrive() {
+ echo "which drive would you like to prepare next?"
+ echo "choices are: ${driveunits}"
+ echo ""
+ getresp
+ case $resp in
+ *) ;;
+ esac
+}
+
+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. Its main objective is to format,"
+echo "mount and create an fstab for your root (/) and user (/usr)"
+echo "partitions."
+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 displayed 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 "scanning for the root device"
+ ;;
+ *)
+ 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
+
+drivetype=sd
+sect_fwd=""
+
+# find out what units are possible for that disk, and query the user.
+getdrives
+for du in $driveunits; do
+ set -- $(getvar $du)
+ if [ $# -ge 2 -a "$1" = "a" -a "`echo $2 | sed -e 's,.*BSD.*,BSD,'`" = "BSD" ]; then
+ rdev=$du
+ fi
+done
+
+echo ""
+echo "The following root devices are available on your machine:"
+echo " "${driveunits}
+echo ""
+prefdev=${rdev}
+rdev=""
+while [ "X${rdev}" = "X" ]; do
+ echo -n "Which device would you like to install on ? [${prefdev}] "
+ getresp ${prefdev}
+ 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}
+ else
+ rdev=${resp}
+ fi
+done
+
+echo ""
+echo "The root device you have chosen is on: ${rdev}"
+echo ""
+# 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
+
+echo ""
+echo "THIS IS YOUR LAST CHANCE!!!"
+echo ""
+echo "(answering yes will format your root partition on $rdev)"
+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 ""
+ 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 "Initializing / (root) filesystem, and mounting..."
+$DONTDOIT newfs /dev/r${rdev}a $name
+$DONTDOIT mount -v /dev/${rdev}a /mnt
+echo ""
+echo -n "Creating a fstab..."
+mkdir -p $FSTABDIR
+echo "/dev/${rdev}a / ffs rw 1 1" > $FSTAB
+
+# get rid of this partition
+shiftvar $rdev
+shiftvar $rdev
+
+echo ""
+echo "Now lets setup your /usr file system"
+echo "(Once a valid input for drive and partition is seen"
+echo "it will be FORMATTED and inserted in the fstab.)"
+while [ "X$usrpart" = "X" ]; do
+ resp=""
+ drivename=""
+ while [ "X$resp" = "X" ]; do
+ echo "choices: $driveunits"
+ echo "which drive do you want /usr on?"
+ getresp
+ set -- $driveunits
+ while [ $# -gt 0 ]; do
+ if [ "X$resp" = "X$1" ]; then
+ drivename=$1
+ break;
+ else
+ shift
+ fi
+ done
+ if [ "X$drivename" != "X" ]; then
+ break
+ fi
+ done
+
+ usrpart=""
+ echo "You have selected $drivename"
+ echo "here is a list of partitions on $drivename"
+ disklabel $drivename 2>/dev/null | sed -e '/^[ ][ ][ad-p]:/p;/^#[ \t]*size/p;d'
+ echo "which partition would you like to format and have"
+ echo -n "mounted as /usr? (supply the letter): "
+ getresp
+ if [ "X$resp" = "X" ]; then
+ continue;
+ fi
+
+ list=$(getvar $drivename)
+ set -- $list
+ while [ $# -gt 0 ]; do
+ if [ "$resp" = "$1" ]; then
+ if [ "`echo $2 | sed -e 's,.*BSD.*,BSD,'`" != "BSD" ]; then
+ echo ""
+ echo -n "$drivename$resp is of type $2 which is not"
+ echo " a BSD filesystem type"
+ break
+ fi
+ usrpart=$drivename$resp
+ break
+ else
+ shift
+ shift
+ fi
+ done
+ if [ "X$usrpart" = "X" ]; then
+ echo "$resp is not a valid input."
+ echo ""
+ fi
+done
+
+echo ""
+echo "Initializing /usr filesystem, and mounting..."
+$DONTDOIT newfs /dev/r${usrpart} $name
+$DONTDOIT mkdir -p /mnt/usr
+$DONTDOIT mount -v /dev/${usrpart} /mnt/usr
+echo ""
+echo -n "Adding to fstab..."
+echo "/dev/${usrpart} /usr ffs rw 1 2" >> $FSTAB
+sync
+echo " done."
+
+echo ""
+echo ""
+echo "OK! The preliminary work of setting up your disk is now complete,"
+echo "and you can install the actual NetBSD software."
+echo ""
+echo "Right now, your root is mounted on /mnt and your usr on /mnt/usr."
+echo "You should consult the installation notes to determine how to load"
+echo "and install the NetBSD distribution sets, and how to configure your"
+echo "system when you are done."
+echo ""
+echo "GOOD LUCK!"
+echo ""
diff --git a/distrib/amiga/floppies/inst/list b/distrib/amiga/floppies/inst/list
new file mode 100644
index 00000000000..79a711eea49
--- /dev/null
+++ b/distrib/amiga/floppies/inst/list
@@ -0,0 +1,10 @@
+# $Id: list,v 1.1 1995/10/18 08:37:28 deraadt 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
+SPECIAL chmod 755 install
diff --git a/distrib/amiga/floppies/list2sh.awk b/distrib/amiga/floppies/list2sh.awk
new file mode 100644
index 00000000000..11f260acd47
--- /dev/null
+++ b/distrib/amiga/floppies/list2sh.awk
@@ -0,0 +1,39 @@
+# $Id: list2sh.awk,v 1.1 1995/10/18 08:37:27 deraadt 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 == "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/amiga/floppies/runlist.sh b/distrib/amiga/floppies/runlist.sh
new file mode 100644
index 00000000000..91c7b2f0582
--- /dev/null
+++ b/distrib/amiga/floppies/runlist.sh
@@ -0,0 +1,13 @@
+# $Id: runlist.sh,v 1.1 1995/10/18 08:37:27 deraadt 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/amiga/floppies/upgr/Makefile b/distrib/amiga/floppies/upgr/Makefile
new file mode 100644
index 00000000000..fffd67f16ac
--- /dev/null
+++ b/distrib/amiga/floppies/upgr/Makefile
@@ -0,0 +1,8 @@
+# $Id: Makefile,v 1.1 1995/10/18 08:37:29 deraadt Exp $
+
+TOP= ${.CURDIR}/..
+
+.include "${TOP}/Makefile.inc"
+IMAGE= upgr-${REV}.fs
+
+.include "${TOP}/inst-common/Makefile.inc"
diff --git a/distrib/amiga/floppies/upgr/dot.hdprofile b/distrib/amiga/floppies/upgr/dot.hdprofile
new file mode 100644
index 00000000000..587f91a7eb6
--- /dev/null
+++ b/distrib/amiga/floppies/upgr/dot.hdprofile
@@ -0,0 +1,62 @@
+#
+# 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.
+#
+# $Id: dot.hdprofile,v 1.1 1995/10/18 08:37:29 deraadt Exp $
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
+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 ^? 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/amiga/floppies/upgr/dot.profile b/distrib/amiga/floppies/upgr/dot.profile
new file mode 100644
index 00000000000..afc90fa2c1c
--- /dev/null
+++ b/distrib/amiga/floppies/upgr/dot.profile
@@ -0,0 +1,56 @@
+#
+# 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.
+#
+# $Id: dot.profile,v 1.1 1995/10/18 08:37:29 deraadt Exp $
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
+export PATH
+TERM=vt100
+export TERM
+
+umask 022
+
+if [ "X${DONEPROFILE}" = "X" ]; then
+ DONEPROFILE=YES
+
+ # 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
+
+ # run the upgrade script.
+ upgrade
+fi
diff --git a/distrib/amiga/floppies/upgr/dot.upgrutils b/distrib/amiga/floppies/upgr/dot.upgrutils
new file mode 100644
index 00000000000..12f820e7c75
--- /dev/null
+++ b/distrib/amiga/floppies/upgr/dot.upgrutils
@@ -0,0 +1,54 @@
+#
+# 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.
+#
+# $Id: dot.upgrutils,v 1.1 1995/10/18 08:37:29 deraadt Exp $
+
+# 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..."
+ 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."
+}
diff --git a/distrib/amiga/floppies/upgr/list b/distrib/amiga/floppies/upgr/list
new file mode 100644
index 00000000000..e4a277b4c2a
--- /dev/null
+++ b/distrib/amiga/floppies/upgr/list
@@ -0,0 +1,7 @@
+# $Id: list,v 1.1 1995/10/18 08:37:29 deraadt Exp $
+
+# and the upgrade tools
+COPY dot.profile .profile
+COPY dot.upgrutils .upgrutils
+COPY upgrade.sh upgrade
+SPECIAL chmod 755 upgrade
diff --git a/distrib/amiga/floppies/upgr/upgrade.sh b/distrib/amiga/floppies/upgr/upgrade.sh
new file mode 100644
index 00000000000..238c0fc0cef
--- /dev/null
+++ b/distrib/amiga/floppies/upgr/upgrade.sh
@@ -0,0 +1,283 @@
+#!/bin/sh
+#
+# 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.
+#
+# $Id: upgrade.sh,v 1.1 1995/10/18 08:37:29 deraadt Exp $
+
+# NetBSD upgrade script.
+# In a perfect world, this would be a nice C program, with a reasonable
+# user interface.
+
+#DONTDOIT=echo
+
+VERSION=1.1
+
+getresp() {
+ read resp
+ if [ "X$resp" = "X" ]; then
+ resp=$1
+ fi
+}
+
+getvar() {
+ echo $(eval $(echo "echo \$$1"))
+}
+
+shiftvar() {
+ local - var
+ var="$1"
+ list="$(getvar $var)"
+ set -- $list
+ shift
+ setvar $var "$*"
+}
+
+getparts() {
+ disklabel $1 2>/dev/null | sed -e '/^[ ][ ][ad-p]/!d' |
+ sed -e 's,^[ ]*\([a-p]\):[ ]*[0-9]*[ ]*[0-9]*[ ][ ]*\([a-zA-Z0-9.]*\).*,\1 \2,' |
+ sed -e ':a
+ N;${s/\n/ /g;p;d;}
+ ba'
+}
+
+getdrives() {
+ local du thispart
+ for du in /dev/rsd?a; do
+ dd if=$du of=/dev/null bs=1b count=1 >/dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ thisunit=`echo $du | sed -e 's,/dev/r\(...\)a,\1,g'`
+ driveunits="$driveunits $thisunit"
+ else
+ continue;
+ fi
+ setvar $thisunit "$(getparts $thisunit)"
+ export $thisunit
+ done
+ export drivenunits
+}
+
+Convert_fstab() {
+ if [ ! -e /mnt/etc/fstab.ufs ]; then
+ mv /mnt/etc/fstab /mnt/etc/fstab.ufs
+ fi
+ sed "s/ufs/ffs/" /mnt/etc/fstab.ufs >/mnt/etc/fstab
+}
+
+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 displayed 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.
+
+getdrives
+
+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 ""
+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..."
+
+ $DONTDOIT 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..."
+$DONTDOIT 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."
+
+#<<<<<<<<<<<<<<<<<<<<<<<< update etc/fstab to ffs? >>>>>>>>>>>>>>>>>>>>>>>>
+echo ""
+echo -n "Converting ufs entries in fstab to ffs..."
+$DONTDOIT Convert_fstab
+echo "Done."
+
+if [ $upgradefs = YES ]; then
+ echo ""
+ echo -n "Copying new fsck binary to your hard disk..."
+ if [ ! -d /mnt/sbin ]; then
+ $DONTDOIT mkdir /mnt/sbin
+ fi
+ $DONTDOIT 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
+ $DONTDOIT sync
+ echo " Done."
+
+ echo ""
+ echo "Re-mounting root partition read-only..."
+ $DONTDOIT 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..."
+ $DONTDOIT 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..."
+ $DONTDOIT 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 "Copying bootstrapping binaries and config files to the hard drive..."
+$DONTDOIT tar -cf - sbin/mount_ffs | (cd /mnt ; tar --unlink -xpf - )
+
+echo ""
+echo "Mounting remaining partitions..."
+$DONTDOIT chroot /mnt mount -at ffs > /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 ""