diff options
-rw-r--r-- | distrib/powerpc/ramdisk/Makefile | 8 | ||||
-rw-r--r-- | distrib/powerpc/ramdisk/dot.instutils | 156 | ||||
-rw-r--r-- | distrib/powerpc/ramdisk/dot.profile | 34 | ||||
-rw-r--r-- | distrib/powerpc/ramdisk/install.md | 103 | ||||
-rw-r--r-- | distrib/powerpc/ramdisk/list | 3 | ||||
-rw-r--r-- | etc/etc.powerpc/Makefile.inc | 8 |
6 files changed, 86 insertions, 226 deletions
diff --git a/distrib/powerpc/ramdisk/Makefile b/distrib/powerpc/ramdisk/Makefile index fa5e9f35186..0f50fc63761 100644 --- a/distrib/powerpc/ramdisk/Makefile +++ b/distrib/powerpc/ramdisk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.9 2000/06/15 02:49:00 rahnds Exp $ +# $OpenBSD: Makefile,v 1.10 2000/08/08 01:08:07 deraadt Exp $ TOP= ${.CURDIR}/.. @@ -43,10 +43,10 @@ ${IMAGE}: rd_setup do_files rd_teardown .endif bsd: - cd ${TOP}/../../sys/arch/powerpc/conf && config RAMDISKMAC - cd ${TOP}/../../sys/arch/powerpc/compile/RAMDISKMAC && \ + cd ${TOP}/../../sys/arch/powerpc/conf && config RAMDISK + cd ${TOP}/../../sys/arch/powerpc/compile/RAMDISK && \ make clean && make - cp ${TOP}/../../sys/arch/powerpc/compile/RAMDISKMAC/bsd bsd + cp ${TOP}/../../sys/arch/powerpc/compile/RAMDISK/bsd bsd rd_setup: dd if=/dev/zero of=${IMAGE} bs=512 count=${NBLKS} diff --git a/distrib/powerpc/ramdisk/dot.instutils b/distrib/powerpc/ramdisk/dot.instutils deleted file mode 100644 index b88122cd0f3..00000000000 --- a/distrib/powerpc/ramdisk/dot.instutils +++ /dev/null @@ -1,156 +0,0 @@ -# $OpenBSD: dot.instutils,v 1.1 1997/10/10 10:16:55 pefo 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=/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/powerpc/ramdisk/dot.profile b/distrib/powerpc/ramdisk/dot.profile index e919a56837e..467f904c999 100644 --- a/distrib/powerpc/ramdisk/dot.profile +++ b/distrib/powerpc/ramdisk/dot.profile @@ -1,4 +1,4 @@ -# $OpenBSD: dot.profile,v 1.3 2000/01/30 01:21:22 deraadt Exp $ +# $OpenBSD: dot.profile,v 1.4 2000/08/08 01:08:07 deraadt Exp $ # # Copyright (c) 1994 Christopher G. Demetriou # All rights reserved. @@ -41,19 +41,35 @@ alias dmesg="cat /kern/msgbuf" if [ "X${DONEPROFILE}" = "X" ]; then DONEPROFILE=YES + # mount kernfs and re-mount the boot media (perhaps r/w) + mount_kernfs /kern /kern + mount_ffs -o update /dev/rd0a / + # set up some sane defaults echo 'erase ^?, werase ^W, kill ^U, intr ^C' stty newcrt werase ^W intr ^C kill ^U erase ^? 9600 - echo '' - mount /dev/rd0a / - # mount the kern_fs so that we can examine the dmesg state - mount -t kernfs /kern /kern + # Installing or upgrading? + _forceloop="" + while [ "X$_forceloop" = X"" ]; do + echo -n '(I)nstall, (U)pgrade or (S)hell? ' + read _forceloop + case "$_forceloop" in + i*|I*) + /install + ;; + + u*|U*) + /upgrade + ;; - # pull in the functions that people will use from the shell prompt. - . /.instutils + s*|S*) + ;; - echo "Follow the installation directions to install or upgrade" - echo "the OpenBSD distribution sets." + *) + _forceloop="" + ;; + esac + done fi diff --git a/distrib/powerpc/ramdisk/install.md b/distrib/powerpc/ramdisk/install.md index d84c3ace438..00472a266af 100644 --- a/distrib/powerpc/ramdisk/install.md +++ b/distrib/powerpc/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.13 1999/09/23 21:33:44 aaron Exp $ +# $OpenBSD: install.md,v 1.14 2000/08/08 01:08:07 deraadt Exp $ # # # Copyright rc) 1996 The NetBSD Foundation, Inc. @@ -41,19 +41,18 @@ # # Machine-dependent install sets -MDSETS="kernel bsdmix bsdofw" +MDSETS="kernel" md_set_term() { - if [ ! -z "$TERM" ]; then - return - fi + test -n "$TERM" && return echo -n "Specify terminal type [vt100]: " - getresp "vt100" - TERM="$resp" + getresp vt100 + TERM=$resp export TERM } md_makerootwritable() { + : } md_machine_arch() { @@ -62,17 +61,17 @@ md_machine_arch() { md_get_diskdevs() { # return available disk devices - cat /kern/msgbuf | egrep "^[sw]d[0-9]|ofdisk[0-9] " | sed -e "s/[ :(].*//" | sort -u + bsort `cat /kern/msgbuf | egrep "^[sw]d[0-9]+|ofdisk[0-9] " | cutword 1` } md_get_cddevs() { # return available CDROM devices - cat /kern/msgbuf | egrep "^cd[0-9] " | sed -e "s/[ :(].*//" | sort -u + bsort `cat /kern/msgbuf | egrep "^cd[0-9]+ " | cutword 1` } md_get_partition_range() { # return range of valid partition letters - echo "[a-p]" + echo [a-p] } md_questions() { @@ -332,70 +331,72 @@ __md_prep_disklabel_1 md_welcome_banner() { { - if [ "$MODE" = "install" ]; then - echo "" - echo "Welcome to the OpenBSD/PowerPC ${VERSION} installation program." - cat << \__welcome_banner_1 + if [ "$MODE" = install ]; then + cat << __EOT +Welcome to the OpenBSD/powerpc ${VERSION_MAJOR}.${VERSION_MINOR} installation program. -This program is designed to help you put OpenBSD on your disk, -in a simple and rational way. You'll be asked several questions, -and it would probably be useful to have your disk's hardware -manual, the installation notes, and a calculator handy. -__welcome_banner_1 +This program is designed to help you put OpenBSD on your disk in a simple and +rational way. +__EOT else - echo "" - echo "Welcome to the OpenBSD/PowerPC ${VERSION} upgrade program." - cat << \__welcome_banner_2 - -This program is designed to help you upgrade your OpenBSD system in a -simple and rational way. + cat << __EOT +Welcome to the OpenBSD/powerpc ${VERSION_MAJOR}.${VERSION_MINOR} upgrade program. -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 -installation may leave your system in an inconsistent state. +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. If you hit Control-C and restart the +install, the install program will remember many of your old answers. -__welcome_banner_3 +__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, power-cycle the system to load new boot code. +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 halted, reset the machine and boot from the disk. +CONGRATULATIONS! You have successfully $what OpenBSD! To boot the +installed system, enter halt at the command prompt. Once the system has +halted, reset the machine and boot from the disk. -__congratulations_1 +__EOT } +hostname() { + case $# in + 0) cat /kern/hostname ;; + 1) echo "$1" > /kern/hostname ;; + *) echo usage: hostname [name-of-host] + esac +} diff --git a/distrib/powerpc/ramdisk/list b/distrib/powerpc/ramdisk/list index 46bf8eb9d90..3dd5c38496a 100644 --- a/distrib/powerpc/ramdisk/list +++ b/distrib/powerpc/ramdisk/list @@ -1,4 +1,4 @@ -# $OpenBSD: list,v 1.15 2000/07/15 02:21:02 deraadt Exp $ +# $OpenBSD: list,v 1.16 2000/08/08 01:08:08 deraadt Exp $ SRCDIRS distrib/special SRCDIRS usr.bin bin sbin usr.sbin gnu/usr.bin @@ -93,7 +93,6 @@ COPY ${TOPDIR}/common/termcap.vt usr/share/misc/termcap # and the installation tools COPY dot.profile .profile -COPY dot.instutils .instutils COPY install.md install.md COPY ${CURDIR}/../../miniroot/install.sh install COPY ${CURDIR}/../../miniroot/upgrade.sh upgrade diff --git a/etc/etc.powerpc/Makefile.inc b/etc/etc.powerpc/Makefile.inc index 67468bb929e..423bf1ad9ee 100644 --- a/etc/etc.powerpc/Makefile.inc +++ b/etc/etc.powerpc/Makefile.inc @@ -1,14 +1,14 @@ -# $OpenBSD: Makefile.inc,v 1.15 2000/02/03 03:06:55 rahnds Exp $ +# $OpenBSD: Makefile.inc,v 1.16 2000/08/08 01:08:07 deraadt Exp $ # etc.powerpc/Makefile.inc -- powerpc-specific etc Makefile targets .ifdef DESTDIR snap_md: bsd distrib bsd: - cd ${.CURDIR}/../sys/arch/powerpc/conf && config GENERICMAC - cd ${.CURDIR}/../sys/arch/powerpc/compile/GENERICMAC && \ + cd ${.CURDIR}/../sys/arch/powerpc/conf && config GENERIC + cd ${.CURDIR}/../sys/arch/powerpc/compile/GENERIC && \ make clean && make depend && make - cp ${.CURDIR}/../sys/arch/powerpc/compile/GENERICMAC/bsd \ + cp ${.CURDIR}/../sys/arch/powerpc/compile/GENERIC/bsd \ ${DESTDIR}/snapshot/bsd # knows about bsd.rd and bsdofw.rd |