From 0647a8191b1b64add344b7921a97303f1ad3c1ba Mon Sep 17 00:00:00 2001 From: Theo Buehler Date: Sat, 19 Oct 2019 13:14:24 +0000 Subject: Determine the OS version in a way that won't break after 9.9. Do it the same way in all three copies of the code. Based on a patch from Chris Waddey. with & ok ajacoutot --- distrib/miniroot/install.sub | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'distrib/miniroot') diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 96c7e992fa8..b86df4f2628 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.1144 2019/10/01 02:11:41 deraadt Exp $ +# $OpenBSD: install.sub,v 1.1145 2019/10/19 13:14:23 tb Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer @@ -2831,7 +2831,7 @@ finish_up() { # on the console and in the rc.firsttime output mail. isin "$ARCH" $_syspatch_archs && cat <<__EOT >>/mnt/etc/rc.firsttime set -A _KERNV -- \$(sysctl -n kern.version | - sed 's/^OpenBSD \([0-9]\.[0-9]\)\([^ ]*\).*/\1 \2/;q') + sed 's/^OpenBSD \([1-9][0-9]*\.[0-9]\)\([^ ]*\).*/\1 \2/;q') if ((\${#_KERNV[*]} == 1)) && [[ -s /etc/installurl ]] && _CKPATCH=\$(mktemp /tmp/_ckpatch.XXXXXXXXXX); then echo "Checking for available binary patches..." -- cgit v1.2.3