summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--distrib/miniroot/install.sub20
-rw-r--r--distrib/miniroot/upgrade.sh4
2 files changed, 5 insertions, 19 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index 5db297596c2..eba795b8b14 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: install.sub,v 1.213 2002/04/29 00:59:35 krw Exp $
+# $OpenBSD: install.sub,v 1.214 2002/04/29 01:38:06 krw Exp $
# $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $
#
# Copyright (c) 1997-2002 Todd Miller, Theo de Raadt, Ken Westerback
@@ -188,18 +188,6 @@ cutlast () {
eval echo \$\{$#\}
}
-basename () {
- local _oifs
-
- [ "$1" ] || return
- _oifs=$IFS
- IFS=/
- set -- $1
- IFS=$_oifs
- while [ "$#" -gt 10 ]; do shift 10; done
- eval echo \$$#
-}
-
isnumeric() {
local _a=$1
@@ -1539,13 +1527,11 @@ The installation program needs to know which tape device to use. Make
sure you use a "no rewind on close" device.
__EOT
- _tape=`basename $TAPE`
resp=
while [ -z "$resp" ]; do
- ask "Name of tape device?" "$_tape"
+ ask "Name of tape device?" "${TAPE##*/}"
done
- _tape=`basename $resp`
- TAPE=/dev/${_tape}
+ TAPE=/dev/${resp##*/}
if [ ! -c $TAPE ]; then
echo "$TAPE does not exist or is not a character special file."
echo "Aborting."
diff --git a/distrib/miniroot/upgrade.sh b/distrib/miniroot/upgrade.sh
index c3d5f92577e..152761fbdd0 100644
--- a/distrib/miniroot/upgrade.sh
+++ b/distrib/miniroot/upgrade.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: upgrade.sh,v 1.33 2002/04/28 20:41:15 krw Exp $
+# $OpenBSD: upgrade.sh,v 1.34 2002/04/29 01:38:06 krw Exp $
# $NetBSD: upgrade.sh,v 1.2.4.5 1996/08/27 18:15:08 gwr Exp $
#
# Copyright (c) 1997-2002 Todd Miller, Theo de Raadt, Ken Westerback
@@ -68,7 +68,7 @@ done
resp=
while [ -z "$resp" ]; do
ask "Root filesystem?" "${ROOTDISK}a"
- _root_filesystem=/dev/`basename $resp`
+ _root_filesystem=/dev/${resp##*/}
if [ ! -b ${_root_filesystem} ]; then
echo "Sorry, ${_root_filesystem} is not a block device."
resp=