summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-04-10 19:29:16 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-04-10 19:29:16 +0000
commitd75231bce2e19296b5e3db3141493272112fcf35 (patch)
tree3f869aa16a102aa64c76c82abc17b7da06c5cf61
parent7d8407636ab5ee7ef4acfe299c5e457c341ebd75 (diff)
If disk device nodes are missing, and MAKEDEV can be found on the media,
use it to make 'em. Now you can install with as many disks as you want. cleanup by espie, tests by jason
-rw-r--r--distrib/miniroot/install.sub18
1 files changed, 17 insertions, 1 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index bb7061318c5..f846e816d81 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: install.sub,v 1.201 2002/04/09 01:59:41 krw Exp $
+# $OpenBSD: install.sub,v 1.202 2002/04/10 19:29:15 deraadt 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
@@ -346,6 +346,20 @@ __EOT
done
}
+makedev() {
+ local _d=$1
+
+ if [ ! -c /dev/r${_d}c ]; then
+ if [ -r /dev/MAKEDEV ]; then
+ (cd /dev; sh MAKEDEV $_d)
+ else
+ echo "Device nodes for $_d are missing, and MAKEDEV"
+ echo "does not exist to create them with. Sorry."
+ false
+ fi
+ fi
+}
+
getanotherdisk() {
cat << __EOT
@@ -361,6 +375,7 @@ __EOT
DISK=done
elif isin $resp $_DKDEVS ; then
DISK=$resp
+ makedev $resp || DISK=
else
echo "\nThe disk $resp does not exist."
DISK=
@@ -389,6 +404,7 @@ __EOT
getresp "$_defdsk"
if isin $resp $_DKDEVS ; then
ROOTDISK=$resp
+ makedev $resp || ROOTDISK=
else
echo "\nThe disk '$resp' does not exist."
ROOTDISK=