summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2010-01-19 19:55:54 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2010-01-19 19:55:54 +0000
commit0ae35011373ed24ae466fc8c4a959acedc6d6731 (patch)
tree9e86722f59bdf181ff0f314b4b1542dc16f8343c /distrib
parentc99bc6a17600dd856af400385089db916f24edd0 (diff)
Build GENERIC-IP30.MP as bsd.mp.IP30 in the distribution, and allow the
installer to pick it and install it as /bsd when applicable.
Diffstat (limited to 'distrib')
-rw-r--r--distrib/sgi/ramdisk/install.md20
1 files changed, 17 insertions, 3 deletions
diff --git a/distrib/sgi/ramdisk/install.md b/distrib/sgi/ramdisk/install.md
index db4d68be711..dca60e97ccc 100644
--- a/distrib/sgi/ramdisk/install.md
+++ b/distrib/sgi/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.20 2009/06/04 00:44:47 krw Exp $
+# $OpenBSD: install.md,v 1.21 2010/01/19 19:55:52 miod Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -32,20 +32,34 @@
# machine dependent section of installation/upgrade script.
#
-IPARCH=`sysctl -n hw.model`
+IPARCH=$(sysctl -n hw.model)
+NCPU=$(sysctl -n hw.ncpufound)
MDSETS="bsd.${IPARCH} bsd.rd.${IPARCH}"
-DEFAULTSETS=${MDSETS}
SANESETS="bsd.${IPARCH}"
+if ((NCPU > 1)); then
+ MDSETS="${MDSETS} bsd.mp.${IPARCH}"
+ SANESETS="${SANESETS} bsd.mp.${IPARCH}"
+fi
+DEFAULTSETS=${MDSETS}
md_installboot() {
cd /mnt
if [[ -f bsd.${IPARCH} ]]; then
mv bsd.${IPARCH} bsd
fi
+ if [[ -f bsd.mp.${IPARCH} ]]; then
+ mv bsd.mp.${IPARCH} bsd.mp
+ fi
if [[ -f bsd.rd.${IPARCH} ]]; then
mv bsd.rd.${IPARCH} bsd.rd
fi
+
+ if [[ -f bsd.mp ]] && ((NCPU > 1)); then
+ echo "Multiprocessor machine; using bsd.mp instead of bsd."
+ mv bsd bsd.sp 2>/dev/null
+ mv bsd.mp bsd
+ fi
}
md_prep_disklabel()