summaryrefslogtreecommitdiff
path: root/distrib/sparc64
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-04-09 20:04:10 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-04-09 20:04:10 +0000
commit169e4ff046c12a691d3d7185d5a5e91ba3e404d2 (patch)
tree281a1c71a0c525f22dfd2700d025986a9092f0f5 /distrib/sparc64
parentee9fc2dcb402c3dfbaad3988c00852037584ef6c (diff)
miniroots may have suprising rootdevs. Cope.
Diffstat (limited to 'distrib/sparc64')
-rw-r--r--distrib/sparc64/common/dot.profile6
1 files changed, 4 insertions, 2 deletions
diff --git a/distrib/sparc64/common/dot.profile b/distrib/sparc64/common/dot.profile
index 565bd6c4415..d876840c651 100644
--- a/distrib/sparc64/common/dot.profile
+++ b/distrib/sparc64/common/dot.profile
@@ -1,4 +1,4 @@
-# $OpenBSD: dot.profile,v 1.4 2002/04/01 01:31:39 deraadt Exp $
+# $OpenBSD: dot.profile,v 1.5 2002/04/09 20:04:09 deraadt Exp $
#
# Copyright (c) 1994 Christopher G. Demetriou
# All rights reserved.
@@ -33,10 +33,12 @@ export PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
umask 022
set -o emacs # emacs-style command line editing
+rootdisk=`dmesg|grep "^root on"|{ o=;while read x y z t;do o=/dev/$z;done;echo $o;}`
+
if [ "X${DONEPROFILE}" = "X" ]; then
DONEPROFILE=YES
- mount -u /dev/rd0a /
+ mount -u ${rootdisk:-/dev/rd0a} /
# set up some sane defaults
echo 'erase ^?, werase ^W, kill ^U, intr ^C, status ^T'