On Tue, Sep 27, 2022 at 09:32:15AM -0600, Todd C. Miller wrote:
> On Tue, 27 Sep 2022 11:28:59 -0400, Josiah Frentsos wrote:
>
> > From ksh(1):
> >
> > [[ expression ]]
> > Similar to the test and [ ... ] commands (described later), with
> > the following exceptions:
> >
> > o Field splitting and file name generation are not
> > performed on arguments.
>
> Ah, right. I don't always remember the rules for those new-fangled
> double-bracket expressions ;-)
Right, omitting quotes inside double brackets is commen style in base.
Feedback? OK?
Index: install.sub
===================================================================
RCS file: /cvs/src/distrib/miniroot/install.sub,v
retrieving revision 1.1207
diff -u -p -r1.1207 install.sub
--- install.sub 27 Sep 2022 12:28:25 -0000 1.1207
+++ install.sub 27 Sep 2022 13:48:57 -0000
@@ -2905,15 +2905,13 @@ finish_up() {
isin "$ARCH" $_syspatch_archs && cat <<'__EOT' >>/mnt/etc/rc.firsttime
set -A _KERNV -- $(sysctl -n kern.version |
sed 's/^OpenBSD \([1-9][0-9]*\.[0-9]\)\([^ ]*\).*/\1 \2/;q')
-if ((${#_KERNV[*]} == 1)) && [[ -s /etc/installurl ]] &&
- _CKPATCH=$(mktemp /tmp/_ckpatch.XXXXXXXXXX); then
+if ((${#_KERNV[*]} == 1)) && [[ -s /etc/installurl ]]; then
echo "Checking for available binary patches..."
- syspatch -c > $_CKPATCH
- if [[ -s $_CKPATCH ]]; then
+ _CKPATCH=$(syspatch -c)
+ if [[ -n $_CKPATCH ]]; then
echo "Run syspatch(8) to install:"
- column -xc 80 $_CKPATCH
+ echo "$_CKPATCH" | column -xc 80
fi
- rm -f $_CKPATCH
fi
__EOT