summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
Diffstat (limited to 'distrib')
-rw-r--r--distrib/mac68k/common/dot.commonutils111
-rw-r--r--distrib/mac68k/ramdisk/Makefile87
-rw-r--r--distrib/mac68k/ramdisk/Makefile.inc25
-rw-r--r--distrib/mac68k/ramdisk/dot.instutils157
-rw-r--r--distrib/mac68k/ramdisk/install.md198
-rw-r--r--distrib/mac68k/ramdisk/list117
-rw-r--r--distrib/mac68k/ramdisk/mtree.conf28
-rw-r--r--distrib/mac68k/ramdisk/rd.disktab5
-rw-r--r--distrib/mac68k/ramdisk/rd.group18
-rw-r--r--distrib/mac68k/ramdisk/rd.master.passwd5
10 files changed, 264 insertions, 487 deletions
diff --git a/distrib/mac68k/common/dot.commonutils b/distrib/mac68k/common/dot.commonutils
deleted file mode 100644
index 35235701df7..00000000000
--- a/distrib/mac68k/common/dot.commonutils
+++ /dev/null
@@ -1,111 +0,0 @@
-#
-# $OpenBSD: dot.commonutils,v 1.1 1999/06/13 10:33:31 downsj Exp $
-# $OpenBSD: dot.commonutils,v 1.1 1999/06/13 10:33:31 downsj 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 OpenBSD installed on
-# the hard disk. These are meant to be invoked from the shell prompt,
-# by people installing OpenBSD.
-
-Set_tmp_dir()
-{
- def_tmp_dir=`pwd`
- if [ "$def_tmp_dir" = "/" -o "$def_tmp_dir" = "/mnt" ]; then
- def_tmp_dir=/mnt/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_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 xvfp /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
- echo -n "Are you installing a '-current' snapshot? [n] "
- read snapshot
- case $snapshot in
- y*|Y*)
- snapshot=y
- ;;
- *)
- snapshot=n
- ;;
- esac
- if [ $snapshot = n ]
- then
- cat "$1".??? | gunzip | (cd / ; tar xfp$tarverbose -)
- else
- cat "$1".tar.gz | gunzip | (cd /mnt ; tar xfp$tarverbose -)
- fi
-}
diff --git a/distrib/mac68k/ramdisk/Makefile b/distrib/mac68k/ramdisk/Makefile
index ff0a133c6ab..fb5cf1b6ed8 100644
--- a/distrib/mac68k/ramdisk/Makefile
+++ b/distrib/mac68k/ramdisk/Makefile
@@ -1,63 +1,59 @@
-# $OpenBSD: Makefile,v 1.1 1999/06/13 10:33:31 downsj Exp $
-# $NetBSD: Makefile,v 1.1 1995/07/18 04:13:06 briggs Exp $
+# $OpenBSD: Makefile,v 1.2 2002/04/24 22:33:41 miod Exp $
TOP= ${.CURDIR}/..
.include "${TOP}/Makefile.inc"
-IMAGE= ramdisk-${REV}.fs
-CRUNCHCONF?= ${.CURDIR}/${CBIN}.conf
-BASE= ramdisk
+BSD_RD= bsd.rd
+BSDSBC_RD= bsdsbc.rd
+IMAGE= mr.fs
+CBIN?= instbin
+LISTS= ${.CURDIR}/list
+UTILS?= ${.CURDIR}/../../miniroot
MOUNT_POINT= /mnt
+MTREE= ${.CURDIR}/mtree.conf
VND?= svnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c
PID!= echo $$$$
-REALIMAGE!= echo /var/tmp/image.${PID}
-GZIP?= gzip
-GZIPFLAGS?= -9f
+DISKTYPE= rdroot
+NBLKS= 2880
+NEWFSARGS= -t ffs -m 0 -o space -u 32 -c 16 -b 4096
-all: ${CBIN} ${IMAGE} bsd.rd
- @echo "all done"
+all: ${BSD_RD} ${BSDSBC_RD}
-install: bsd.rd
- cp bsd.rd ${DESTDIR}/snapshot/bsd.rd
- cp bsdsbc.rd ${DESTDIR}/snapshot/bsdsbc.rd
+${BSD_RD}: ${CBIN} ${IMAGE} bsd rdsetroot
+ cp bsd ${BSD_RD}
+ ${.OBJDIR}/rdsetroot ${BSD_RD} < ${IMAGE}
-.include "Makefile.inc"
+${BSDSBC_RD}: ${CBIN} ${IMAGE} bsdsbc rdsetroot
+ cp bsdsbc ${BSDSBC_RD}
+ ${.OBJDIR}/rdsetroot ${BSDSBC_RD} < ${IMAGE}
-DISKTYPE= rdroot
-NBLKS= 4096
-NEWFSARGS= -m 0 -o space -c 16 -i 3072
-
-bsd.rd: ${IMAGE} bsd rdsetroot
- ${.OBJDIR}/rdsetroot bsd < ${IMAGE}
- ${GZIP} -c ${GZIPFLAGS} bsd > bsd.rd
+${IMAGE}: rd_setup do_files rd_teardown
bsd:
+.ifndef(NOBUILD)
cd ${.CURDIR}/../../../sys/arch/mac68k/conf && config RAMDISK
cd ${.CURDIR}/../../../sys/arch/mac68k/compile/RAMDISK && \
make clean && make depend && make
+.endif
cp ${.CURDIR}/../../../sys/arch/mac68k/compile/RAMDISK/bsd bsd
-bsdsbc.rd: ${IMAGE} bsdsbc rdsetroot
- ${.OBJDIR}/rdsetroot bsdsbc < ${IMAGE}
- ${GZIP} -c ${GZIPFLAGS} bsdsbc > bsdsbc.rd
-
bsdsbc:
+.ifndef(NOBUILD)
cd ${.CURDIR}/../../../sys/arch/mac68k/conf && config RAMDISKSBC
cd ${.CURDIR}/../../../sys/arch/mac68k/compile/RAMDISKSBC && \
make clean && make depend && make
+.endif
cp ${.CURDIR}/../../../sys/arch/mac68k/compile/RAMDISKSBC/bsd bsdsbc
-${IMAGE}: ${CBIN} rd_setup do_files rd_teardown
-
-rd_setup: ${CBIN}
- dd if=/dev/zero of=${REALIMAGE} bs=512 count=${NBLKS}
- vnconfig -v -c ${VND} ${REALIMAGE}
+rd_setup:
+ dd if=/dev/zero of=${IMAGE} bs=512 count=${NBLKS}
+ vnconfig -v -c ${VND} ${IMAGE}
disklabel -w ${VND} ${DISKTYPE}
newfs ${NEWFSARGS} ${VND_RDEV}
fsck ${VND_RDEV}
@@ -67,15 +63,38 @@ rd_teardown:
@df -i ${MOUNT_POINT}
-umount ${MOUNT_POINT}
-vnconfig -u ${VND}
- cp ${REALIMAGE} ${IMAGE}
- rm ${REALIMAGE}
rdsetroot: ${TOP}/../common/rdsetroot.c
- ${HOSTCC} -DDEBUG -o rdsetroot ${TOP}/../common/rdsetroot.c
+ ${HOSTCC} -DBROKEN_NMAGIC -DDEBUG -o rdsetroot ${TOP}/../common/rdsetroot.c
unconfig:
-umount -f ${MOUNT_POINT}
-vnconfig -u ${VND}
- -/bin/rm -f ${IMAGE}
.PRECIOUS: ${IMAGE}
+
+install:
+ cp ${BSD_RD} ${DESTDIR}/snapshot/${BSD_RD}
+ cp ${BSDSBC_RD} ${DESTDIR}/snapshot/${BSDSBC_RD}
+
+${CBIN}.conf: ${LISTS}
+ awk -f ${UTILS}/makeconf.awk CBIN=${CBIN} ${LISTS} > ${CBIN}.conf
+
+${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CBIN}.conf
+ crunchgen -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib ${CBIN}.conf
+
+${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
+ make -f ${CBIN}.mk all
+
+do_files:
+ mtree -def ${MTREE} -p ${MOUNT_POINT}/ -u
+ TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
+ REV=${REV} TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${LISTS}
+
+clean cleandir:
+ /bin/rm -f core ${IMAGE} ${CBIN} ${CBIN}.conf ${CBIN}.mk ${CBIN}.cache \
+ *.o *.lo *.c bsd bsdmix bsdofw ${BSD_RD} ${BSDSBC_RD} \
+ rdsetroot
+
+.include <bsd.obj.mk>
+.include <bsd.subdir.mk>
diff --git a/distrib/mac68k/ramdisk/Makefile.inc b/distrib/mac68k/ramdisk/Makefile.inc
index 1ccd2026923..0c17085647e 100644
--- a/distrib/mac68k/ramdisk/Makefile.inc
+++ b/distrib/mac68k/ramdisk/Makefile.inc
@@ -1,29 +1,40 @@
#
-# $OpenBSD: Makefile.inc,v 1.1 1999/06/13 10:33:31 downsj Exp $
+# $OpenBSD: Makefile.inc,v 1.2 2002/04/24 22:33:41 miod Exp $
# $NetBSD: Makefile.inc,v 1.1 1995/07/18 04:13:14 briggs Exp $
#
# TOP is assumed to be defined by Makefile including this one.
-CBIN?= raminst
-COMMONDIR= ${TOP}/ramdisk
+CBIN?= rmainst
+LISTS= ${.CURDIR}/list
+UTILS?= ${.CURDIR}/../../miniroot
+COMMONDIR= ${TOP}/ramdisk
MOUNT_POINT?= ${TOP}/${BASE}/fs
-LISTS= ${.CURDIR}/list
CRUNCHCONF?= ${COMMONDIR}/${CBIN}.conf
MTREE= ${COMMONDIR}/mtree.conf
+RAWLABEL=
-${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
- crunchgen -D ${BSDSRCDIR} -L ${DESTDIR}/usr/lib ${CRUNCHCONF}
+${CBIN}.conf: ${LISTS}
+ awk -f ${UTILS}/makeconf.awk CBIN=${CBIN} ${LISTS} > ${CBIN}.conf
+
+${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CBIN}.conf
+ crunchgen -D ${BSDSRCDIR} -L ${DESTDIR}/usr/lib ${CBIN}.conf
${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
make -f ${CBIN}.mk all
+#${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
+# crunchgen -D ${BSDSRCDIR} -L ${DESTDIR}/usr/lib ${CRUNCHCONF}
+
+#${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
+# make -f ${CBIN}.mk all
+
do_files:
mtree -def ${MTREE} -p ${MOUNT_POINT}/ -u
TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
- REV=${REV} TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${LISTS}
+ TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${LISTS}
clean cleandir:
/bin/rm -f core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache *.o *.lo *.c
diff --git a/distrib/mac68k/ramdisk/dot.instutils b/distrib/mac68k/ramdisk/dot.instutils
deleted file mode 100644
index 6bffec9b512..00000000000
--- a/distrib/mac68k/ramdisk/dot.instutils
+++ /dev/null
@@ -1,157 +0,0 @@
-#
-# $OpenBSD: dot.instutils,v 1.1 1999/06/13 10:33:31 downsj Exp $
-# $NetBSD: dot.instutils,v 1.1 1995/07/18 04:13:08 briggs 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 OpenBSD configured
-# reasonably once it is installed on the hard disk. These are meant to be
-# invoked from the shell prompt, by people installing OpenBSD.
-
-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 ${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, 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..."
- cd ${DEV}
- sh MAKEDEV all
- echo " done."
-
- sync
-
- echo "You may now reboot your machine with the shutdown command."
- echo " shutdown -r now"
- echo "to reboot or"
- echo " shutdown -h now"
- echo "to halt."
- echo "Remember to erase the miniroot name from the booter's"
- echo "booting preferences dialog box before booting again."
-}
diff --git a/distrib/mac68k/ramdisk/install.md b/distrib/mac68k/ramdisk/install.md
index 5b88481ada7..2e109fbfe1b 100644
--- a/distrib/mac68k/ramdisk/install.md
+++ b/distrib/mac68k/ramdisk/install.md
@@ -1,8 +1,28 @@
-#!/bin/sh
+# $OpenBSD: install.md,v 1.8 2002/04/24 22:33:41 miod Exp $
#
-# $OpenBSD: install.md,v 1.7 2002/03/31 17:30:30 deraadt Exp $
-# $NetBSD: install.md,v 1.1.2.4 1996/08/26 15:45:14 gwr Exp $
+# Copyright (c) 2002, Miodrag Vallat.
+# 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.
#
+# THIS SOFTWARE IS PROVIDED BY ITS 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 ITS 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.
+#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# All rights reserved.
#
@@ -38,47 +58,37 @@
# POSSIBILITY OF SUCH DAMAGE.
#
#
-# machine dependent section of installation/upgrade script
+# machine dependent section of installation/upgrade script.
+#
#
# Machine-dependent install sets
-MDSETS=kernel
+MDSETS="bsd-generic bsd-genericsbc"
ARCH=ARCH
md_set_term() {
- echo -n "Specify terminal type [vt220]: "
- getresp "vt220"
+ if [ ! -z "$TERM" ]; then
+ return
+ fi
+ echo -n "Specify terminal type [vt100]: "
+ getresp "vt100"
TERM="$resp"
export TERM
- # set screensize (i.e., for an xterm)
- rows=`stty -a | grep rows | cutword 4`
- columns=`stty -a | grep columns | cutword 6`
- if [ "$rows" -eq 0 -o "$columns" -eq 0 ]; then
- echo -n "Specify terminal rows [25]: "
- getresp "25"
- rows="$resp"
-
- echo -n "Specify terminal columns [80]: "
- getresp "80"
- columns="$resp"
-
- stty rows "$rows" columns "$columns"
- fi
}
md_get_diskdevs() {
# return available disk devices
- dmesg | egrep -a "^sd[0-9]+ " | cutword 1 | sort -u
+ bsort `dmesg | egrep -a "^[sw]d[0-9]+ " | cutword 1`
}
md_get_cddevs() {
- # return available CD-ROM devices
- dmesg | egrep -a "^cd[0-9]+ " | cutword 1 | sort -u
+ # return available CDROM devices
+ bsort `dmesg | egrep -a "^cd[0-9]+ " | cutword 1`
}
md_get_partition_range() {
# return range of valid partition letters
- echo "[a-p]"
+ echo [a-p]
}
md_questions() {
@@ -86,91 +96,127 @@ md_questions() {
}
md_installboot() {
+ # no standalone boot block
:
}
-md_checkfordisklabel() {
- # We don't have disklabels.
- return 0
+md_native_fstype() {
+ :
}
-md_prep_disklabel()
-{
- # We don't have disklabels.
+md_native_fsopts() {
+ :
}
-# Note, while they might not seem machine-dependent, the
-# welcome banner and the punt message may contain information
-# and/or instructions specific to the type of machine.
+md_checkfordisklabel() {
+ # $1 is the disk to check
+ local rval
+
+ disklabel $1 > /dev/null 2> /tmp/checkfordisklabel
+ if grep "no OpenBSD or MacOS disk label" /tmp/checkfordisklabel; then
+ rval=1
+ elif grep "disk label corrupted" /tmp/checkfordisklabel; then
+ rval=2
+ elif grep " HFS " /tmp/checkfordisklabel; then
+ rval=3
+ else
+ rval=0
+ fi
+
+ rm -f /tmp/checkfordisklabel
+ return $rval
+}
+
+md_prep_disklabel() {
+ local _disk=$1
+ local _wflag="-W"
+
+ md_checkfordisklabel $_disk
+ case $? in
+ 0) ;;
+ 1) echo WARNING: Label on disk $_disk has no label. You will be creating a new one.
+ echo
+ ;;
+ 2) echo WARNING: Label on disk $_disk is corrupted. You will be repairing.
+ echo
+ ;;
+ 3) echo WARNING: This disk has been set up under Mac OS. For safety reasons, you
+ echo will not be allowed to save any disklabel changes from OpenBSD.
+ echo
+ _wflag="-N"
+ ;;
+ esac
+
+ # display example
+ cat << __EOT
+If you are unsure of how to use multiple partitions properly
+(ie. separating /, /usr, /tmp, /var, /usr/local, and other things)
+just split the space into a root and swap partition for now.
+
+__EOT
+ disklabel ${_wflag} ${_disk}
+ disklabel -f /tmp/fstab.${_disk} -E ${_disk}
+}
md_welcome_banner() {
-(
+{
if [ "$MODE" = "install" ]; then
- echo "Welcome to the OpenBSD/mac68k ${VERSION_MAJOR}.${VERSION_MINOR} installation program."
- cat << \__welcome_banner_1
+ cat << __EOT
+Welcome to the OpenBSD/mac68k ${VERSION_MAJOR}.${VERSION_MINOR} installation program.
-This program is designed to help you put OpenBSD on your system in a
-simple and rational way.
-__welcome_banner_1
+This program is designed to help you put OpenBSD on your disk, in a simple and
+rational way.
+__EOT
else
- echo "Welcome to the OpenBSD/mac68k ${VERSION_MAJOR}.${VERSION_MINOR} upgrade program."
- cat << \__welcome_banner_2
+ cat << __EOT
+Welcome to the OpenBSD/mac68k ${VERSION_MAJOR}.${VERSION_MINOR} upgrade program.
-This program is designed to help you upgrade your OpenBSD system in a
-simple and rational way.
-
-As a reminder, installing the `etc' binary set is NOT recommended.
-Once the rest of your system has been upgraded, you should manually
-merge any changes to files in the `etc' set into those files which
+This program is designed to help you upgrade your OpenBSD system in a simple
+and rational way. As a reminder, installing the 'etc' binary set is NOT
+recommended. Once the rest of your system has been upgraded, you should
+manually merge any changes to files in the 'etc' set into those files which
already exist on your system.
-__welcome_banner_2
+__EOT
fi
-cat << \__welcome_banner_3
+cat << __EOT
-As with anything which modifies your disk's contents, this program can
-cause SIGNIFICANT data loss, and you are advised to make sure your
-data is backed up before beginning the installation process.
+As with anything which modifies your disk's contents, this
+program can cause SIGNIFICANT data loss, and you are advised
+to make sure your data is backed up before beginning the
+installation process.
-Default answers are displayed in brackets after the questions. You
-can hit Control-C at any time to quit, but if you do so at a prompt,
-you may have to hit return. Also, quitting in the middle of
+Default answers are displayed in brackets after the questions.
+You can hit Control-C at any time to quit, but if you do so at a
+prompt, you may have to hit return. Also, quitting in the middle of
installation may leave your system in an inconsistent state.
-__welcome_banner_3
-) | less -E
+__EOT
+} | more
}
md_not_going_to_install() {
- cat << \__not_going_to_install_1
+ cat << __EOT
-OK, then. Enter 'halt' at the prompt to halt the machine. Once the
-machine has halted, reset the system in order to reboot.
+OK, then. Enter `halt' at the prompt to halt the machine. Once the
+machine has halted, power-cycle the system to load new boot code.
-__not_going_to_install_1
+__EOT
}
md_congrats() {
local what;
- if [ "$MODE" = install ]; then
- what=installed
+ if [ "$MODE" = "install" ]; then
+ what="installed";
else
- what=upgraded
+ what="upgraded";
fi
- cat << \__congratulations_1
+ cat << __EOT
CONGRATULATIONS! You have successfully $what OpenBSD! To boot the
-installed system, enter halt at the command prompt. Once the system has
+installed system, enter halt at the command prompt. Once the system has
halted, reset the machine and boot from the disk.
-__congratulations_1
-}
-
-md_native_fstype() {
- # Nothing to do.
-}
-
-md_native_fsopts() {
- # Nothing to do.
+__EOT
}
diff --git a/distrib/mac68k/ramdisk/list b/distrib/mac68k/ramdisk/list
index b5880220d81..309f1bc2353 100644
--- a/distrib/mac68k/ramdisk/list
+++ b/distrib/mac68k/ramdisk/list
@@ -1,76 +1,73 @@
-# $OpenBSD: list,v 1.10 2002/04/22 02:43:16 deraadt Exp $
+# $OpenBSD: list,v 1.11 2002/04/24 22:33:41 miod Exp $
-COPY ${OBJDIR}/raminst raminst
-LINK raminst bin/cat
-LINK raminst bin/chmod bin/chgrp sbin/chown
-LINK raminst bin/cp
-LINK raminst bin/df
-LINK raminst bin/dd
-LINK raminst bin/ed
-LINK raminst bin/expr
-LINK raminst bin/ln
-LINK raminst bin/ls
-LINK raminst bin/kill
-LINK raminst bin/hostname
-LINK raminst bin/mkdir
-LINK raminst bin/mv
-LINK raminst bin/pwd
-LINK raminst bin/rm
-LINK raminst bin/sh
-LINK bin/sh bin/-sh
-LINK raminst bin/sleep
-LINK raminst bin/stty
-LINK raminst bin/sync
-LINK raminst bin/test
-LINK raminst bin/[
-LINK raminst sbin/disklabel
-LINK raminst sbin/fsck
-LINK raminst sbin/halt
-LINK raminst sbin/ifconfig
-LINK raminst sbin/init
-LINK raminst sbin/mknod
-LINK raminst usr/bin/more
-LINK raminst sbin/mount
-LINK raminst sbin/mount_cd9660
-LINK raminst sbin/mount_ffs
-LINK raminst sbin/mount_nfs
-LINK raminst sbin/mount_mfs
-LINK raminst sbin/newfs
-LINK raminst sbin/reboot
-LINK raminst sbin/route
-LINK raminst sbin/umount
-LINK raminst usr/bin/ftp
-LINK raminst usr/bin/egrep
-LINK raminst usr/bin/grep
-LINK raminst usr/bin/gzip
-LINK raminst usr/bin/less
-LINK raminst usr/bin/sed
-LINK raminst bin/pax
-LINK raminst usr/bin/tar
-SPECIAL /bin/rm raminst
+# copy the crunched binary, link to it, and kill it
+COPY ${OBJDIR}/instbin instbin
+LINK instbin bin/cat
+LINK instbin bin/chmod bin/chgrp sbin/chown
+LINK instbin bin/cp
+LINK instbin bin/dd
+LINK instbin bin/df
+LINK instbin bin/ed
+LINK instbin bin/expr
+LINK instbin bin/hostname
+LINK instbin bin/ln
+LINK instbin bin/ls
+LINK instbin bin/mkdir
+LINK instbin bin/mt
+LINK instbin bin/mv
+LINK instbin bin/pax bin/tar bin/cpio
+LINK instbin bin/rm
+LINK instbin bin/ksh bin/sh
+ARGVLINK ksh -sh
+LINK instbin bin/stty
+LINK instbin bin/test bin/[
+LINK instbin sbin/dhclient
+LINK instbin sbin/disklabel
+LINK instbin sbin/dmesg
+LINK instbin sbin/fsck
+LINK instbin sbin/fsck_ffs
+LINK instbin sbin/reboot 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_nfs
+LINK instbin sbin/newfs
+LINK instbin sbin/ping
+LINK instbin sbin/route
+LINK instbin sbin/umount
+LINK instbin usr/bin/grep usr/bin/fgrep usr/bin/egrep
+LINK instbin usr/bin/less usr/bin/more
+LINK instbin usr/bin/ftp
+LINK instbin usr/bin/gzip usr/bin/gunzip usr/bin/gzcat
+LINK instbin usr/bin/sed
+SPECIAL rm instbin
# copy the MAKEDEV script and make some devices
-#COPY ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV
-COPY ${CURDIR}/../../../etc/etc.mac68k/MAKEDEV dev/MAKEDEV
+COPY ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV
SPECIAL cd dev; sh MAKEDEV ramdisk
+#SPECIAL /bin/rm dev/MAKEDEV
# various files that we need in /etc for the install
-COPY rd.group etc/group
-COPY rd.master.passwd etc/master.passwd
-COPY rd.disktab etc/disktab
-SPECIAL cd etc; pwd_mkdb -p -d . ./master.passwd
+COPY ${DESTDIR}/etc/group etc/group
+COPY ${DESTDIR}/etc/protocols etc/protocols
+COPY ${DESTDIR}/etc/services etc/services
+COPY ${DESTDIR}/etc/spwd.db etc/spwd.db
+SYMLINK /tmp/disktab.shadow etc/disktab
+SYMLINK /tmp/fstab.shadow etc/fstab
+SYMLINK /tmp/resolv.conf.shadow etc/resolv.conf
+SYMLINK /tmp/hosts etc/hosts
# and the common installation tools
SPECIAL sed -e '/^#[ ].*$/d' < ${TOPDIR}/common/termcap.vt > usr/share/misc/termcap
# and the installation tools
SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' < ${CURDIR}/../../miniroot/dot.profile > .profile
-SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' -e "s/^ARCH=ARCH$/ARCH=`arch -ks`/" < ${CURDIR}/../install.md > install.md
+SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' -e "s/^ARCH=ARCH$/ARCH=`arch -ks`/" < ${CURDIR}/install.md > install.md
SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' < ${CURDIR}/../../miniroot/install.sh > install
SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' < ${CURDIR}/../../miniroot/upgrade.sh > upgrade
-SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' -e "/^VERSION=/s/=.*/=${REV}/" < ${CURDIR}/../../miniroot/install.sub > install.sub
+SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' -e "/^VERSION=/s/=.*/=${REV}/" < ${CURDIR}/../../miniroot/install.sub > install.sub
SPECIAL chmod 755 install upgrade
-
-# so DNS can work
-SYMLINK /tmp/resolv.conf.shadow etc/resolv.conf
diff --git a/distrib/mac68k/ramdisk/mtree.conf b/distrib/mac68k/ramdisk/mtree.conf
index cf713eab1f6..7476ca910ba 100644
--- a/distrib/mac68k/ramdisk/mtree.conf
+++ b/distrib/mac68k/ramdisk/mtree.conf
@@ -1,5 +1,5 @@
#
-# $OpenBSD: mtree.conf,v 1.2 2001/06/23 19:44:45 deraadt Exp $
+# $OpenBSD: mtree.conf,v 1.3 2002/04/24 22:33:41 miod Exp $
# $NetBSD: mtree.conf,v 1.1 1995/07/18 04:13:24 briggs Exp $
#
@@ -38,22 +38,10 @@ sbin
..
# ./tmp
-tmp
+tmp mode=01777
# ./tmp
..
-# ./var
-var
-
-# ./var/tmp
-tmp
-
-# ./var
-..
-
-# ./
-..
-
# ./usr
usr
@@ -80,3 +68,15 @@ misc
# ./usr
..
+
+# ./var
+var
+
+# ./var/tmp
+tmp mode=01777
+
+# ./var/tmp
+..
+
+# ./var
+..
diff --git a/distrib/mac68k/ramdisk/rd.disktab b/distrib/mac68k/ramdisk/rd.disktab
deleted file mode 100644
index 8774e320cd6..00000000000
--- a/distrib/mac68k/ramdisk/rd.disktab
+++ /dev/null
@@ -1,5 +0,0 @@
-# $OpenBSD: rd.disktab,v 1.1 1999/06/13 10:33:32 downsj Exp $
-rdroot|ramdiskroot|RAM-disk root FS image:\
- :ty=simulated:se#512:nc#16:nt#2:ns#128:\
- :ta=4.4BSD:oa#0:pa#4096:fa#512:ba#4096\
- :ob#0:pb#0:oc#0:pc#4096:
diff --git a/distrib/mac68k/ramdisk/rd.group b/distrib/mac68k/ramdisk/rd.group
deleted file mode 100644
index cd640bf99c8..00000000000
--- a/distrib/mac68k/ramdisk/rd.group
+++ /dev/null
@@ -1,18 +0,0 @@
-wheel:*:0:
-daemon:*:1:
-kmem:*:2:
-sys:*:3:
-tty:*:4:
-operator:*:5:
-bin:*:7:
-news:*:8:
-wsrc:*:9:
-users:*:10:
-games:*:13:
-staff:*:20
-guest:*:31:
-utmp:*:45:
-ingres:*:74:
-dialer:*:117:
-nogroup:*:32766:
-nobody:*:32767:
diff --git a/distrib/mac68k/ramdisk/rd.master.passwd b/distrib/mac68k/ramdisk/rd.master.passwd
deleted file mode 100644
index f2563743371..00000000000
--- a/distrib/mac68k/ramdisk/rd.master.passwd
+++ /dev/null
@@ -1,5 +0,0 @@
-root::0:0::0:0::/:/bin/sh
-daemon:*:1:31::0:0::/:/bin/sh
-operator:*:2:20::0:0::/:/bin/sh
-bin:*:3:7::0:0::/:/sbin/sh
-uucp:*:66:1::0:0::/:/bin/sh