summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-11-16 21:18:36 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-11-16 21:18:36 +0000
commit0adfda79540297fc9b0748ce282951b3fb2c15cd (patch)
tree94a3d55a91bf84f4652e743629258c77ab0a32f0
parent63cf4a880e24f1c1eb28fd3c7e7d1cef6a62cd77 (diff)
Simplify the sed expression used to set 'rootdisk'. Shaves bytes from the
install media. From Tamas Tevesz.
-rw-r--r--distrib/miniroot/dot.profile10
1 files changed, 2 insertions, 8 deletions
diff --git a/distrib/miniroot/dot.profile b/distrib/miniroot/dot.profile
index 396b68e3699..7163308b4b1 100644
--- a/distrib/miniroot/dot.profile
+++ b/distrib/miniroot/dot.profile
@@ -1,4 +1,4 @@
-# $OpenBSD: dot.profile,v 1.6 2007/02/16 04:48:48 deraadt Exp $
+# $OpenBSD: dot.profile,v 1.7 2007/11/16 21:18:35 krw Exp $
# $NetBSD: dot.profile,v 1.1 1995/12/18 22:54:43 pk Exp $
#
# Copyright (c) 1995 Jason R. Thorpe
@@ -36,13 +36,7 @@ umask 022
# emacs-style command line editing
set -o emacs
-rootdisk=`dmesg|sed -n -e '/OpenBSD /h' -e '//!H' -e '${
- g
- p
-}'|sed -n -e '/^root on \([0-9a-z]*\).*/{
- s//\/dev\/\1/
- p
-}'`
+rootdisk=`dmesg|sed -n '/^root on /!d;${s#^root on \([^ ]*\).*#/dev/\1#;p;}'`
if [ "X${DONEPROFILE}" = "X" ]; then
DONEPROFILE=YES