diff options
Diffstat (limited to 'distrib/miniroot')
-rw-r--r-- | distrib/miniroot/install.sh | 91 | ||||
-rw-r--r-- | distrib/miniroot/install.sub | 14 |
2 files changed, 25 insertions, 80 deletions
diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh index 83900c03bc9..28605c3d0bf 100644 --- a/distrib/miniroot/install.sh +++ b/distrib/miniroot/install.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: install.sh,v 1.36 1998/09/28 13:19:48 deraadt Exp $ +# $OpenBSD: install.sh,v 1.37 1998/09/28 13:28:35 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 @@ -159,10 +159,8 @@ if [ "`df /`" = "`df /mnt`" ]; then getrootdisk done DISK=$ROOTDISK - iter=ROOT else DISK="" - iter="" while [ "X${DISK}" = "X" ]; do getanotherdisk done @@ -171,7 +169,6 @@ if [ "`df /`" = "`df /mnt`" ]; then fi fi - if [ "${DISK}" != "nfs" ]; then # Deal with disklabels, including editing the root disklabel # and labeling additional disks. This is machine-dependent since # some platforms may not be able to provide this functionality. @@ -188,7 +185,7 @@ You will be prompted for the mount point (full path, including the prepending partition or "done" when you are finished. __get_filesystems_1 - if [ "${DISK}" = "${ROOTDISK}" -a "${ROOTDISK}" != "nfs" ]; then + if [ "${DISK}" = "${ROOTDISK}" ]; then echo echo "The following partitions will be used for the root filesystem and swap:" echo " ${ROOTDISK}a /" @@ -250,47 +247,6 @@ __get_filesystems_1 fi _i=$(( ${_i} + 1 )) done - else # above was for non nfs, this is nfs - while :; do - echo -n "nfs server: [$_nfs_server] " - getresp "$_nfs_server" - if [ "X$resp" = "X" ]; then - continue - fi - _nfs_server="$resp" - break - done - while :; do - echo -n "subdir on nfs server: [$_nfs_dir] " - getresp "$_nfs_dir" - if [ "X$resp" = "X" ]; then - continue - fi - _nfs_dir="$resp" - break - done - # Get the mount point from the user - while : ; do - if [ "${iter}" = "ROOT" ]; then - _mp="/" - break - fi - echo -n "Mount point for ${_nfs_server}:${_nfs_dir} [$_mp, RET, none, or done]? " - getresp "$_mp" - case "X${resp}" in - X/*) _mp=$resp - break ;; - Xdone|X) - break ;; - Xnone) _mp= - break;; - *) echo "mount point must be an absolute path!";; - esac - done - if [ -n "${_mp}" ]; then - echo "${_nfs_server}:${_nfs_dir} ${_mp}" >> ${FILESYSTEMS} - fi - fi done echo "" @@ -311,20 +267,15 @@ __get_filesystems_1 esac echo echo "============================================================" - tmpfslist="" - while read _device_name _junk; do - # nfs is special - if [ "`echo $_device_name|sed '/^[^ ]*:/!d'`" ]; then - continue - fi - tmpfslist="${tmpfslist} ${_device_name}" - done < ${FILESYSTEMS} - - # if it is all spaces aka all nfs - if [ "X${tmpfslist## *}" != "X" ]; then - echo "The next step will overwrite any existing data on:" - echo " ${tmpfslist}" + ( + echo -n " " + while read _device_name _junk; do + echo -n "${_device_name} " + done + echo "" + ) < ${FILESYSTEMS} + echo "" echo -n "Are you really sure that you're ready to proceed? [n] " getresp "n" @@ -339,12 +290,11 @@ __get_filesystems_1 # Loop though the file, place filesystems on each device. echo "Creating filesystems..." - - for _device_name in ${tmpfslist}; do - newfs /dev/r${_device_name} - done - - fi # if [ "${tmpfslist... + ( + while read _device_name _junk; do + newfs /dev/r${_device_name} + done + ) < ${FILESYSTEMS} else # Get the root device ROOTDISK=`df /mnt | sed -e '/^\//!d' -e 's/\/dev\/\([^ ]*\)[a-p] .*/\1/'` @@ -513,12 +463,6 @@ if [ "`df /`" = "`df /mnt`" ]; then # fstab. ( while read _dev _mp; do - # nfs is special - if [ "`echo $_dev|sed '/^[^ ]*:/!d'`" ]; then - echo $_dev $_mp nfs rw 0 0 - continue - fi - if [ "$_mp" = "/" ]; then echo /dev/$_dev $_mp ffs rw 1 1 else @@ -633,9 +577,8 @@ else echo "done." fi -if [ "${ROOTDISK}" != "nfs" ]; then - md_installboot ${ROOTDISK} -fi + +md_installboot ${ROOTDISK} if [ ! -x /mnt/dev/MAKEDEV ]; then echo "No /dev/MAKEDEV installed, something is wrong here..." diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index d3867186022..c6a9fbe2bd0 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: install.sub,v 1.98 1998/09/28 12:34:06 deraadt Exp $ +# $OpenBSD: install.sub,v 1.99 1998/09/28 13:28:36 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 @@ -129,7 +129,7 @@ isin() { if [ "$_a" = "$1" ]; then return 0; fi shift done - return + return 1 } addel() { @@ -363,12 +363,14 @@ Now you can select another disk to initialize. (Do not re-select a disk you have already entered information for). Available disks are: __getanotherdisk_1 - _DKDEVS=`md_get_diskdevs; echo nfs` + _DKDEVS=`md_get_diskdevs` echo "$_DKDEVS" echo "" echo -n "Which one? [done] " getresp "" - if [ "X${resp}" = "X" -o "X${resp}" = "Xdone" ]; then + if [ "X${resp}" = "X" ]; then + DISK=done + elif [ "X${resp}" = "Xdone" ]; then DISK=done elif isin $resp $_DKDEVS ; then DISK="$resp" @@ -390,7 +392,7 @@ Available disks are: __getrootdisk_1 local _defdsk; - _DKDEVS=`md_get_diskdevs; echo nfs` + _DKDEVS=`md_get_diskdevs` _defdsk=`echo $_DKDEVS | cutlast` if [ "${_defdsk}" != "${_DKDEVS}" ]; then _defdsk="" @@ -1599,7 +1601,7 @@ mkdir /mnt2 > /dev/null 2>&1 if ! mount_nfs $_nfs_tcp ${_nfs_server_ip}:${_nfs_server_path} \ /mnt2 ; then echo "Cannot mount NFS server. Aborting." - return 1 + return fi # Get the directory where the file lives |