From ba660231be3c47afc918dcf4e0d6c5b8c97286e8 Mon Sep 17 00:00:00 2001 From: Robert Peichaer Date: Fri, 8 Apr 2016 17:09:19 +0000 Subject: Directly assign device name to rootdisk with modified sed pattern. With help from and OK halex@ OK krw@ --- distrib/miniroot/dot.profile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'distrib/miniroot/dot.profile') 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 -- cgit v1.2.3