summaryrefslogtreecommitdiff
path: root/distrib/macppc
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2009-04-24 01:04:34 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2009-04-24 01:04:34 +0000
commit699609200788a70f7a6343856ec4cc6aa56ff488 (patch)
tree014670ea7de707c466e946f8fd6c640a9e23aacb /distrib/macppc
parentccc7dc43c676d792468c3679070f1e8752d5267e (diff)
Move bsd.mp juggling into relevant MD files. Make bsd.mp a default
selection on multi-processor machines. Make bsd.mp a sanity check item on multi-processor machines. ok deraadt@
Diffstat (limited to 'distrib/macppc')
-rw-r--r--distrib/macppc/ramdisk/install.md13
1 files changed, 12 insertions, 1 deletions
diff --git a/distrib/macppc/ramdisk/install.md b/distrib/macppc/ramdisk/install.md
index 6568cccc189..446a8140d20 100644
--- a/distrib/macppc/ramdisk/install.md
+++ b/distrib/macppc/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.38 2009/04/12 12:56:02 krw Exp $
+# $OpenBSD: install.md,v 1.39 2009/04/24 01:04:33 krw Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -34,10 +34,21 @@
MDXAPERTURE=2
ARCH=ARCH
+NCPU=$(sysctl -n hw.ncpufound)
+
+((NCPU > 1)) && { DEFAULTSETS="bsd bsd.rd bsd.mp" ; SANESETS="bsd bsd.mp" ; }
md_installboot() {
local _disk=$1
+ cd /mnt
+ 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
+ ln -sf bsd bsd.mp
+ fi
+
[[ $disklabeltype == MBR ]] || return
echo -n "Copying 'ofwboot' to the boot partition (${_disk}i)..."