diff options
author | Robert Peichaer <rpe@cvs.openbsd.org> | 2016-04-08 17:09:19 +0000 |
---|---|---|
committer | Robert Peichaer <rpe@cvs.openbsd.org> | 2016-04-08 17:09:19 +0000 |
commit | ba660231be3c47afc918dcf4e0d6c5b8c97286e8 (patch) | |
tree | 28853a2325b6b2409ec8c787c9a0d2c4f4ed28da /distrib/miniroot/dot.profile | |
parent | 23712e95e6828f00d011bc83ecd2920d3ff9d285 (diff) |
Directly assign device name to rootdisk with modified sed pattern.
With help from and OK halex@
OK krw@
Diffstat (limited to 'distrib/miniroot/dot.profile')
-rw-r--r-- | distrib/miniroot/dot.profile | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/distrib/miniroot/dot.profile b/distrib/miniroot/dot.profile index 911f4da9a5f..c7bd6a935ad 100644 --- a/distrib/miniroot/dot.profile +++ b/distrib/miniroot/dot.profile @@ -1,4 +1,4 @@ -# $OpenBSD: dot.profile,v 1.31 2016/04/02 12:23:46 rpe Exp $ +# $OpenBSD: dot.profile,v 1.32 2016/04/08 17:09:18 rpe Exp $ # $NetBSD: dot.profile,v 1.1 1995/12/18 22:54:43 pk Exp $ # # Copyright (c) 2009 Kenneth R. Westerback @@ -44,8 +44,7 @@ set -o emacs # Extract rootdisk from last 'root on ...' line. e.g. # root on wd0a swap on wd0b dump on wd0b -set -- $(dmesg | sed -n '/^root on /h;${g;p;}') -rootdisk=$3 +rootdisk=$(dmesg | sed -E '/^root on ([^ ]+) .*$/h;$!d;g;s//\1/') if [[ -z $DONEPROFILE ]]; then DONEPROFILE=YES |