Index | Thread | Search

From:
Andrew Hewus Fresh <andrew@afresh1.com>
Subject:
keydisk in installer fix
To:
tech@openbsd.org
Cc:
krw@openbsd.org, kn@openbsd.org
Date:
Sat, 6 Dec 2025 16:06:29 -0800

Download raw body.

Thread
It seems somehow a basic regular expression was added in r1.1279 with
sed -E to enable extended regular expressions.  It seems to work either
without the E or without the slashes.  Any preference on how to fix it?

Removing two slashes is one character shorter than removing the E :-)

OK for either option?


Index: install.sub
===================================================================
RCS file: /cvs/src/distrib/miniroot/install.sub,v
diff -u -p -r1.1281 install.sub
--- install.sub	16 Nov 2025 13:15:31 -0000	1.1281
+++ install.sub	7 Dec 2025 00:00:06 -0000
@@ -3122,7 +3122,7 @@ pick_keydisk() {
 	_disk=$resp
 
 	make_dev $_disk
-	_parts=$(disklabel $_disk | sed -En "/.*RAID.*/s/^  \(.\): .*/\1/p")
+	_parts=$(disklabel $_disk | sed -n "/.*RAID.*/s/^  \(.\): .*/\1/p")
 	if [[ -n $_parts ]]; then
 		echo "$_disk must contain a RAID partition."
 		return 1


Index: install.sub
===================================================================
RCS file: /cvs/src/distrib/miniroot/install.sub,v
diff -u -p -r1.1281 install.sub
--- install.sub	16 Nov 2025 13:15:31 -0000	1.1281
+++ install.sub	6 Dec 2025 23:58:40 -0000
@@ -3122,7 +3122,7 @@ pick_keydisk() {
 	_disk=$resp
 
 	make_dev $_disk
-	_parts=$(disklabel $_disk | sed -En "/.*RAID.*/s/^  \(.\): .*/\1/p")
+	_parts=$(disklabel $_disk | sed -En "/.*RAID.*/s/^  (.): .*/\1/p")
 	if [[ -n $_parts ]]; then
 		echo "$_disk must contain a RAID partition."
 		return 1