summaryrefslogtreecommitdiff
path: root/distrib/hp300
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1997-10-20 07:06:05 +0000
committerJason Downs <downsj@cvs.openbsd.org>1997-10-20 07:06:05 +0000
commita7e7884b29d7b8341731943e68f1fe821d68bc7a (patch)
treedc41e683b82ce6fe485963d6f9e46a5b7f0049bf /distrib/hp300
parent2f461154a7628662a7ab6b55ce42dbca30678ed2 (diff)
Sync.
Diffstat (limited to 'distrib/hp300')
-rw-r--r--distrib/hp300/ramdisk/install.sh164
-rw-r--r--distrib/hp300/ramdisk/install.sub90
2 files changed, 132 insertions, 122 deletions
diff --git a/distrib/hp300/ramdisk/install.sh b/distrib/hp300/ramdisk/install.sh
index b1287b7e5f3..dd8c6e45a43 100644
--- a/distrib/hp300/ramdisk/install.sh
+++ b/distrib/hp300/ramdisk/install.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: install.sh,v 1.4 1997/10/13 07:47:22 downsj Exp $
+# $OpenBSD: install.sh,v 1.5 1997/10/20 07:06:03 downsj Exp $
# $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -138,15 +138,9 @@ if [ "`df /`" = "`df /mnt`" ]; then
# XXX ASSUMES THAT THE USER DOESN'T PROVIDE BOGUS INPUT.
cat << \__get_filesystems_1
-You will now have the opportunity to enter filesystem information.
-You will be prompted for device name and mount point (full path,
-including the prepending '/' character).
-
-Note that these do not have to be in any particular order. You will
-be given the opportunity to edit the resulting 'fstab' file before
-any of the filesystems are mounted. At that time you will be able
-to resolve any filesystem order dependencies.
-
+You will now have the opportunity to enter filesystem information. You will be
+prompted for device name and mount point (full path, including the prepending
+'/' character). (NOTE: these do not have to be in any particular order).
__get_filesystems_1
echo "The following will be used for the root filesystem:"
@@ -204,8 +198,9 @@ __get_filesystems_1
*)
;;
esac
- echo ""
- echo "The next step will overwrite any existing data on:"
+ echo
+ echo "============================================================"
+ echo "The next step will overwrite any existing data on:"
(
echo -n " "
while read _device_name _junk; do
@@ -231,7 +226,6 @@ __get_filesystems_1
(
while read _device_name _junk; do
newfs /dev/r${_device_name}
- echo ""
done
) < ${FILESYSTEMS}
else
@@ -246,13 +240,10 @@ fi
# root filesystem later.
cat << \__network_config_1
-You will now be given the opportunity to configure the network. This will
-be useful if you need to transfer the installation sets via FTP or NFS.
-Even if you choose not to transfer installation sets that way, this
-information will be preserved and copied into the new root filesystem.
-
-Note, enter all symbolic host names WITHOUT the domain name appended.
-I.e. use 'hostname' NOT 'hostname.domain.name'.
+You will now be given the opportunity to configure the network. This will be
+useful if you need to transfer the installation sets via FTP, HTTP, or NFS.
+Even if you choose not to transfer installation sets that way, this information
+will be preserved and copied into the new root filesystem.
__network_config_1
echo -n "Configure the network? [y] "
@@ -260,17 +251,22 @@ getresp "y"
case "$resp" in
y*|Y*)
resp="" # force at least one iteration
- if [ -f /etc/myname ]; then
- resp=`cat /etc/myname`
+ _nam=""
+ if [ -f /tmp/myname ]; then
+ _nam=`cat /tmp/myname`
fi
while [ "X${resp}" = X"" ]; do
- echo -n "Enter system hostname: [$resp] "
- getresp "$resp"
+ echo -n "Enter system hostname (short form): [$_nam] "
+ getresp "$_nam"
done
hostname $resp
echo $resp > /tmp/myname
resp="" # force at least one iteration
+ if [ -f /tmp/resolv.conf ]; then
+ FQDN=`grep '^domain ' /tmp/resolv.conf | \
+ sed -e 's/^domain //'`
+ fi
while [ "X${resp}" = X"" ]; do
echo -n "Enter DNS domain name: [$FQDN] "
getresp "$FQDN"
@@ -279,8 +275,12 @@ case "$resp" in
configurenetwork
- echo -n "Enter IP address of default route: [none] "
- getresp "none"
+ resp="none"
+ if [ -f /tmp/mygate ]; then
+ resp=`cat /tmp/mygate`
+ fi
+ echo -n "Enter IP address of default route: [$resp] "
+ getresp "$resp"
if [ "X${resp}" != X"none" ]; then
route delete default > /dev/null 2>&1
if route add default $resp > /dev/null ; then
@@ -288,8 +288,13 @@ case "$resp" in
fi
fi
- echo -n "Enter IP address of primary nameserver: [none] "
- getresp "none"
+ resp="none"
+ if [ -f /tmp/resolv.conf ]; then
+ resp=`grep '^nameserver ' /tmp/resolv.conf | \
+ sed -e 's/^nameserver //'`
+ fi
+ echo -n "Enter IP address of primary nameserver: [$resp] "
+ getresp "$resp"
if [ "X${resp}" != X"none" ]; then
echo "domain $FQDN" > /tmp/resolv.conf
echo "nameserver $resp" >> /tmp/resolv.conf
@@ -308,40 +313,34 @@ case "$resp" in
esac
fi
- echo ""
- echo "The host table is as follows:"
- echo ""
- cat /tmp/hosts
- echo ""
- echo "You may want to edit the host table in the event that"
- echo "you are doing an NFS installation or an FTP installation"
- echo "without a name server and want to refer to the server by"
- echo "name rather than by its numeric ip address."
- echo -n "Would you like to edit the host table with ${EDITOR}? [n] "
- getresp "n"
- case "$resp" in
- y*|Y*)
- ${EDITOR} /tmp/hosts
- ;;
-
- *)
- ;;
- esac
+ if [ ! -f /tmp/resolv.conf.shadow ]; then
+ echo ""
+ echo "The host table is as follows:"
+ echo ""
+ cat /tmp/hosts
+ echo ""
+ echo "You may want to edit the host table in the event that"
+ echo "you are doing an NFS installation or an FTP installation"
+ echo "without a name server and want to refer to the server by"
+ echo "name rather than by its numeric ip address."
+ echo -n "Would you like to edit the host table with ${EDITOR}? [n] "
+ getresp "n"
+ case "$resp" in
+ y*|Y*)
+ ${EDITOR} /tmp/hosts
+ ;;
+
+ *)
+ ;;
+ esac
+ fi
cat << \__network_config_2
-You will now be given the opportunity to escape to the command shell to
-do any additional network configuration you may need. This may include
-adding additional routes, if needed. In addition, you might take this
-opportunity to redo the default route in the event that it failed above.
-If you do change the default route, and wish for that change to carry over
-to the installed system, execute the following command at the shell
-prompt:
-
- echo <ip_address_of_gateway> > /tmp/mygate
-
-where <ip_address_of_gateway> is the IP address of the default router.
-
+You will now be given the opportunity to escape to the command shell to do
+any additional network configuration you may need. This may include adding
+additional routes, if needed. In addition, you might take this opportunity
+to redo the default route in the event that it failed above.
__network_config_2
echo -n "Escape to shell? [n] "
getresp "n"
@@ -372,30 +371,31 @@ if [ "`df /`" = "`df /mnt`" ]; then
done
) < ${FILESYSTEMS} > /tmp/fstab
- echo "The fstab is configured as follows:"
- echo ""
- cat /tmp/fstab
- cat << \__fstab_config_1
-
-You may wish to edit the fstab. For example, you may need to resolve
-dependencies in the order which the filesystems are mounted. You may
-also wish to take this opportunity to place NFS mounts in the fstab.
-This would be especially useful if you plan to keep '/usr' on an NFS
-server.
-
-__fstab_config_1
- echo -n "Edit the fstab with ${EDITOR}? [n] "
- getresp "n"
- case "$resp" in
- y*|Y*)
- ${EDITOR} /tmp/fstab
- ;;
-
- *)
- ;;
- esac
+# XXX We no longer do the following. It is not neccessary. It can be done
+# XXX after the install is complete.
+#
+# echo "The fstab is configured as follows:"
+# echo ""
+# cat /tmp/fstab
+# cat << \__fstab_config_1
+#
+#You may wish to edit the fstab. You may also wish to take this opportunity to
+#place NFS mounts in the fstab (this would be especially useful if you plan to
+#keep '/usr' on an NFS server.
+#__fstab_config_1
+# echo -n "Edit the fstab with ${EDITOR}? [n] "
+# getresp "n"
+# case "$resp" in
+# y*|Y*)
+# ${EDITOR} /tmp/fstab
+# ;;
+#
+# *)
+# ;;
+# esac
+#
+# echo ""
- echo ""
munge_fstab /tmp/fstab /tmp/fstab.shadow
mount_fs /tmp/fstab.shadow
fi
diff --git a/distrib/hp300/ramdisk/install.sub b/distrib/hp300/ramdisk/install.sub
index cbb4411ed73..fa96c49dc25 100644
--- a/distrib/hp300/ramdisk/install.sub
+++ b/distrib/hp300/ramdisk/install.sub
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: install.sub,v 1.6 1997/10/13 07:47:23 downsj Exp $
+# $OpenBSD: install.sub,v 1.7 1997/10/20 07:06:04 downsj Exp $
# $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -301,11 +301,9 @@ __get_reldir_1
getrootdisk() {
cat << \__getrootdisk_1
-The installation program needs to know which disk to consider
-the root disk. Note the unit number may be different than
-the unit number you used in the standalone installation
-program.
-
+The installation program needs to know which disk to consider the root disk.
+Note the unit number may be different than the unit number you used in the
+boot program (especially on a PC with multiple disk controllers).
Available disks are:
__getrootdisk_1
@@ -381,32 +379,41 @@ addifconfig() {
configurenetwork() {
local _ifsdone
local _ifs
+ local _ouranswer
+ local _reprompt
_IFS=`md_get_ifdevs`
_ifsdone=""
+ _ouranswer=""
+ _reprompt=1
resp="" # force at least one iteration
while [ "X${resp}" != X"done" ]; do
- cat << \__configurenetwork_1
+ if [ $_reprompt = 1 ]; then
+ cat << \__configurenetwork_1
You may configure the following network interfaces (the interfaces
marked with [X] have been succesfully configured):
__configurenetwork_1
- for _ifs in $_IFS; do
- if isin $_ifs $_ifsdone ; then
- echo -n "[X] "
- else
- echo -n " "
- fi
- echo $_ifs
- done
- echo ""
- echo -n "Configure which interface? [done] "
- getresp "done"
+ for _ifs in $_IFS; do
+ if isin $_ifs $_ifsdone ; then
+ echo -n " [X] "
+ else
+ echo -n " [ ] "
+ fi
+ echo $_ifs
+ done
+ echo ""
+ fi
+ echo -n "Configure which interface? (or, enter 'done') [$_ouranswer] "
+ getresp "$_ouranswer"
case "$resp" in
"done")
;;
+ "")
+ _reprompt=0
+ ;;
*)
_ifs=$resp
if isin $_ifs $_IFS ; then
@@ -416,8 +423,11 @@ __configurenetwork_1
else
echo "Invalid response: \"$resp\" is not in list"
fi
+ _ouranswer="done"
+ _reprompt=1
;;
esac
+
done
}
@@ -464,9 +474,11 @@ configure_ifs() {
done
# Get netmask
- resp="" # force one iteration
+ if [ "X${_interface_mask}" = X"" ]; then
+ _interface_mask=255.255.255.0
+ fi
while [ "X${resp}" = X"" ]; do
- echo -n "Netmask? [$_interface_mask] "
+ echo -n "Netmask ? [$_interface_mask] "
getresp "$_interface_mask"
_interface_mask=$resp
done
@@ -477,8 +489,7 @@ configure_ifs() {
echo " -link0 BNC"
echo " link0 -link1 AUI"
echo " link0 link1 UTP"
- echo "But please keep in mind not all drivers use flags like this."
- echo ""
+ echo "(But please keep in mind not all drivers use flags like this)."
echo -n "Additional link-layer arguments? [$_interface_extra] "
getresp "$_interface_extra"
if [ "X${resp}" != X"" ]; then
@@ -611,15 +622,16 @@ install_url() {
# Is this an ftp or http install?
_url_type=$1; shift
- echo "\nThis is an automated ${_url_type}-based installation process.\n"\
-"You will be asked several questions and then the\n"\
-"files will be retrieved iteratively via ftp(1).\n"
+ echo
+ echo "This is an automated ${_url_type}-based installation process. You will be asked"
+ echo "questions and then the files will be retrieved iteratively via ftp(1)."
+ echo
# Proxy the connections?
if [ "X${_proxy_host}" = X"" ]; then
_proxy_host=none
fi
- echo -n "http/ftp proxy URL? [${_proxy_host}] "
+ echo -n "HTTP/FTP proxy URL? (if you use a proxy) [${_proxy_host}] "
getresp "${_proxy_host}"
if [ "X${resp}" = X"none" ]; then
unset _proxy_host ftp_proxy http_proxy
@@ -648,14 +660,14 @@ install_url() {
case "$resp" in
n*|N*) ;;
*)
- ftp ${_ftp_passive} -V -a ftp://ftp.usa.openbsd.org/pub/OpenBSD/${VERSION_MAJOR}.${VERSION_MINOR}/ftplist | grep "^${_url_type}:"
+ ftp ${_ftp_passive} -V -a ftp://ftp.openbsd.org/pub/OpenBSD/${VERSION_MAJOR}.${VERSION_MINOR}/ftplist | grep "^${_url_type}:"
;;
esac
# Get server IP address
resp="" # force one iteration
while [ "X${resp}" = X"" ]; do
- eval echo -n "Server IP? [\$_${_url_type}_server_ip]\ "
+ eval echo -n "Server IP address or hostname? [\$_${_url_type}_server_ip]\ "
eval getresp "\$_${_url_type}_server_ip"
eval _${_url_type}_server_ip=$resp
done
@@ -777,17 +789,16 @@ install_url() {
_next=""
for _f in $_sets $_kernel ; do
if isin $_f $_setsdone ; then
- echo -n "[X] "
+ echo -n " [X] "
_next=""
else
- echo -n " "
+ echo -n " [ ] "
if [ -z "$_next" ]; then
_next=$_f
fi
fi
echo $_f
done
- echo ""
# Get the name of the file.
echo -n "File name [$_next]? "
@@ -825,10 +836,9 @@ install_url() {
return
fi
- echo ""
- echo "Fetching files via ${_url_type} may take a long time,"
- echo "especially over a slow network connection."
- echo -n "Ready to download files? [y] "
+ echo
+ echo "Fetching files via ${_url_type} may take a long time, especially over a slow network"
+ echo -n "connection. Ready to download files? [y] "
getresp "y"
case "$resp" in
y*|Y*)
@@ -875,10 +885,10 @@ install_url() {
_next=""
for _f in $_failed_files ; do
if isin $_f $_setsdone ; then
- echo -n "[X] "
+ echo -n " [X] "
_next=""
else
- echo -n " "
+ echo -n " [ ] "
if [ -z "$_next" ]; then
_next=$_f
fi
@@ -947,10 +957,10 @@ install_from_mounted_fs() {
_next=""
for _f in $_sets $_kernel ; do
if isin $_f $_setsdone; then
- echo -n "[X] "
+ echo -n " [X] "
_next=""
else
- echo -n " "
+ echo -n " [ ] "
if [ -z "$_next" ]; then
_next=$_f
fi
@@ -1253,7 +1263,7 @@ install_nfs() {
# Get the IP address of the server
resp="" # force one iteration
while [ "X${resp}" = X"" ]; do
- echo -n "Server IP address? [${_nfs_server_ip}] "
+ echo -n "Server IP address or hostname? [${_nfs_server_ip}] "
getresp "${_nfs_server_ip}"
done
_nfs_server_ip=$resp