diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-04-07 08:47:35 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-04-07 08:47:35 +0000 |
commit | 73a18b5784c7ae12fca38523b697d21aa5f5ad10 (patch) | |
tree | 558223ca93dd5f191932c010b9b6e585d5ee9c18 /distrib/miniroot | |
parent | 9775315ad4972ebab5571648b7a9da9e65945de8 (diff) |
save bytes; move swapon question
Diffstat (limited to 'distrib/miniroot')
-rw-r--r-- | distrib/miniroot/install.sh | 70 | ||||
-rw-r--r-- | distrib/miniroot/install.sub | 74 |
2 files changed, 74 insertions, 70 deletions
diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh index 4e467406c3d..85ab42ec118 100644 --- a/distrib/miniroot/install.sh +++ b/distrib/miniroot/install.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: install.sh,v 1.48 1999/04/07 06:09:22 deraadt Exp $ +# $OpenBSD: install.sh,v 1.49 1999/04/07 08:47:34 deraadt Exp $ # $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $ # # Copyright (c) 1997,1998 Todd Miller, Theo de Raadt @@ -109,7 +109,7 @@ if [ "`df /`" = "`df /mnt`" ]; then echo -n "Proceed with installation? [n] " else echo "You seem to be trying to restart an interrupted installation!" - echo "" + echo echo "You can try to skip the disk preparation steps and continue," echo "otherwise you should reboot the miniroot and start over..." echo -n "Skip disk initialization? [n] " @@ -117,7 +117,7 @@ fi getresp "n" case "$resp" in y*|Y*) - echo "" + echo echo "Cool! Let's get to it..." ;; *) @@ -213,7 +213,7 @@ __get_filesystems_1 done # Now prompt the user for the mount points. Loop until "done" - echo "" + echo _i=0 resp="X" while [ $_npartitions -gt 0 -a X${resp} != X"done" ]; do @@ -252,11 +252,29 @@ __get_filesystems_1 done done - echo "" + if [ -f /sbin/swapon ]; then + echo + echo "Do you wish to enable swap for this install (WARNING: Useful for low memory" + echo "machines, but only do this if the b partition on the root disk was configured" + echo -n "correctly before this kernel boot, or disaster will result)? [n] " + getresp "n" + case "$resp" in + y*|Y*) + swapon /dev/${ROOTDISK}b + ;; + reboot) + reboot + ;; + *) + ;; + esac + fi + + echo echo "You have configured the following devices and mount points:" - echo "" + echo cat ${FILESYSTEMS} - echo "" + echo echo "Filesystems will now be created on these devices." echo "If you made any mistakes, you may edit this now." echo -n "Edit using ${EDITOR}? [n] " @@ -276,9 +294,9 @@ __get_filesystems_1 while read _device_name _junk; do echo -n "${_device_name} " done - echo "" + echo ) < ${FILESYSTEMS} - echo "" + echo echo -n "Are you really sure that you're ready to proceed? [n] " getresp "n" @@ -306,20 +324,6 @@ else done fi -if [ -f /sbin/swapon ]; then - echo "Do you wish to enable swap for this install (WARNING: Useful for low memory" - echo "machines, but only do this if the b partition on the root disk was configured" - echo -n "correctly before this kernel boot, or disaster will result)? [n]" - getresp "n" - case "$resp" in - y*|Y*) - swapon /dev/${ROOTDISK}b - ;; - *) - ;; - esac -fi - # Get network configuration information, and store it for placement in the # root filesystem later. cat << \__network_config_1 @@ -357,11 +361,11 @@ case "$resp" in done FQDN=$resp - echo "" + echo echo "If you have any devices being configured by a DHCP server" echo "it is recommended that you do not enter a default route or" echo "any name servers." - echo "" + echo configurenetwork @@ -431,9 +435,9 @@ case "$resp" in fi if [ ! -f /tmp/resolv.conf.shadow ]; then - echo "" + echo echo "The host table is as follows:" - echo "" + echo cat /tmp/hosts cat << __hosts_table_1 @@ -493,7 +497,7 @@ if [ "`df /`" = "`df /mnt`" ]; then # XXX after the install is complete. # # echo "The fstab is configured as follows:" -# echo "" +# echo # cat /tmp/fstab # cat << \__fstab_config_1 # @@ -512,7 +516,7 @@ if [ "`df /`" = "`df /mnt`" ]; then # ;; # esac # -# echo "" +# echo munge_fstab /tmp/fstab /tmp/fstab.shadow mount_fs /tmp/fstab.shadow @@ -542,14 +546,14 @@ while [ "X${resp}" = X"" ]; do stty -echo getresp "${_password}" stty echo - echo "" + echo _password=$resp echo -n "Password (again): " stty -echo getresp "" stty echo - echo "" + echo if [ "${_password}" != "${resp}" ]; then echo "Passwords do not match, try again." resp="" @@ -565,9 +569,9 @@ md_copy_kernel if [ ! -d /mnt/etc -o ! -d /mnt/usr/share/zoneinfo -o ! -d /mnt/dev ]; then echo "Something needed to complete the installation seems" echo "to be missing, did you forget to extract a required set?" - echo "" + echo echo "Please review the installation notes and try again..." - echo "" + echo echo "You *may* be able to correct the problem and type 'install'" echo "without having to extract all of the distribution sets again." exit diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 23c261b3008..eb5ba123629 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: install.sub,v 1.120 1999/04/05 00:26:49 millert Exp $ +# $OpenBSD: install.sub,v 1.121 1999/04/07 08:47:34 deraadt Exp $ # $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $ # # Copyright (c) 1997,1998 Todd Miller, Theo de Raadt @@ -351,7 +351,7 @@ you have already entered information for). Available disks are: __EOT _DKDEVS=`md_get_diskdevs` echo "$_DKDEVS" - echo "" + echo echo -n "Which one? [done] " getresp "" if [ "X${resp}" = "X" ]; then @@ -361,7 +361,7 @@ __EOT elif isin $resp $_DKDEVS ; then DISK="$resp" else - echo "" + echo echo "The disk $resp does not exist." DISK="" fi @@ -384,13 +384,13 @@ __EOT _defdsk="" fi echo "$_DKDEVS" - echo "" + echo echo -n "Which disk is the root disk [${_defdsk}]? " getresp "${_defdsk}" if isin $resp $_DKDEVS ; then ROOTDISK="$resp" else - echo "" + echo echo "The disk $resp does not exist." ROOTDISK="" fi @@ -455,7 +455,7 @@ __EOT fi echo $_ifs done - echo "" + echo fi echo -n "Configure which interface? (or, enter 'done') [$_ouranswer] " getresp "$_ouranswer" @@ -693,15 +693,15 @@ enable_network() { echo "Network interface configuration:" ifconfig -am - echo "" + echo if [ "X${_resolver_enabled}" = X"TRUE" ]; then route show - echo "" + echo echo "Resolver enabled." else route -n show - echo "" + echo echo "Resolver not enabled." fi @@ -927,14 +927,14 @@ if [ "${_url_type}" = "ftp" ]; then stty -echo getresp "${_ftp_server_password}" stty echo - echo "" + echo _ftp_server_password=$resp echo -n "Password (again): " stty -echo getresp "${_ftp_server_password}" stty echo - echo "" + echo if [ "${_ftp_server_password}" != "${resp}" ]; then echo "Passwords do not match, try again." resp="" @@ -1000,9 +1000,9 @@ else n*|N*) return ;; *) ;; esac - echo "" + echo echo "${_file_list}" - echo "" + echo return else echo "Adding *.tar.gz and *.tgz files to selector." @@ -1035,17 +1035,17 @@ done # Allow the user to select/de-select additional sets while : ; do - echo "" + echo echo "The following sets are available for extraction." echo "Enter filename, \`list', \`all', or \`done'." echo "You may de-select a set by prepending a '-' to its name." - echo "" + echo get_selection "$_sets $_kernel" if [ "X${resp}" = X"done" ]; then break elif [ "X${resp}" = X"list" ]; then - echo "" + echo eval echo "\$_${_url_type}_server_dir:" echo "${_file_list}" continue @@ -1075,7 +1075,7 @@ esac # Download the files one at a time and keep track of which ones failed while test -n "${_get_files}" ; do _failed_files="" - echo "" + echo for _f in $_get_files ; do echo "Getting ${_f} ..." if [ "X${_f}" = "X${_kernel}" ]; then @@ -1093,20 +1093,20 @@ while test -n "${_get_files}" ; do # Give them the option of refetching failed files. _get_files="" while test -n "${_failed_files}" ; do - echo "" + echo echo "The following files failed to transfer and extract correctly:" echo "Choose which one(s) to refetch or 'done' to exit selector." echo "You may de-select a file by prepending a '-' to its name." - echo "" + echo get_selection "$_failed_files" if [ "X${resp}" = X"done" ]; then break elif [ "X${resp}" = X"list" ]; then - echo "" + echo eval echo "\$_${_url_type}_server_dir:" echo "${_file_list}" - echo "" + echo continue fi @@ -1156,9 +1156,9 @@ else n*|N*) return ;; *) ;; esac - echo "" + echo ( cd $1 && ls ) - echo "" + echo return else echo "Adding *.tar.gz and *.tgz files to selector." @@ -1189,17 +1189,17 @@ done # Allow the user to select/de-select additional sets while : ; do - echo "" + echo echo "The following sets are available for extraction." echo "Enter filename, \`list', \`all', or \`done'." echo "You may de-select a set by prepending a '-' to its name." - echo "" + echo get_selection "$_sets $_kernel" if [ "X${resp}" = X"done" ]; then break elif [ "X${resp}" = X"list" ]; then - echo "" + echo echo "${1}:" ( cd $1 && ls ) continue @@ -1228,7 +1228,7 @@ esac # Extract the files one at a time and keep track of which ones failed while test -n "${_get_files}" ; do _failed_files="" - echo "" + echo for _f in $_get_files ; do echo "$1/${_f}:" if [ "X${_f}" = "X${_kernel}" ]; then @@ -1246,20 +1246,20 @@ while test -n "${_get_files}" ; do # Give them the option of retrying failed files. _get_files="" while test -n "${_failed_files}" ; do - echo "" + echo echo "The following files failed to extract correctly:" echo "Choose which one(s) to retry or 'done' to exit selector." echo "You may de-select a file by prepending a '-' to its name." - echo "" + echo get_selection "$_failed_files" if [ "X${resp}" = X"done" ]; then break elif [ "X${resp}" = X"list" ]; then - echo "" + echo echo "${1}:" ( cd $1 && ls ) - echo "" + echo continue fi @@ -1280,7 +1280,7 @@ the CD-ROM device containing the partition with the installation sets: __EOT _CDDEVS=`md_get_cddevs` echo "$_CDDEVS" -echo "" +echo echo -n "Which is the CD-ROM with the installation media? [abort] " getresp "abort" case "$resp" in @@ -1293,7 +1293,7 @@ case "$resp" in if isin $resp $_CDDEVS ; then _drive=$resp else - echo "" + echo echo "The CD-ROM $resp does not exist." echo "Aborting." return @@ -1385,7 +1385,7 @@ case "$resp" in if isin $resp $_DKDEVS ; then _drive=$resp else - echo "" + echo echo "The disk $resp does not exist." echo "Aborting." return 0 @@ -1491,7 +1491,7 @@ the disk device containing the partition with the installation sets: __EOT _DKDEVS=`md_get_diskdevs` echo "$_DKDEVS" -echo "" +echo echo -n "Which is the disk with the installation sets? [abort] " if mount_a_disk ; then @@ -1820,7 +1820,7 @@ __EOT # Give the user the opportunity to extract more sets. They # don't necessarily have to come from the same media. - echo "" + echo echo -n "Extract more sets? [n] " getresp "n" case "$resp" in @@ -1970,7 +1970,7 @@ local _fstab=$1 check_kernel() { if [ ! -s /mnt/bsd ]; then - echo "" + echo echo "Warning, no kernel installed!" echo "You did not unpack a file set containing a kernel." echo "This is needed to boot. Please note that the install" |