From 51669adf2446385b38bab4efcb4133c19e9be806 Mon Sep 17 00:00:00 2001 From: Alex Musolino Date: Wed, 11 May 2022 16:33:37 +0000 Subject: [PATCH] inst/prepdisk: fix invocations of test(1) Test(1) was fixed some time ago [1] to properly parse all of its command line arguments. As such, we need to be more careful about using test(1) with globbing patterns. [1] changeset b562b269cea44e09d3c642b1a9452e16bd8ce3b5 --- rc/bin/inst/prepdisk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rc/bin/inst/prepdisk b/rc/bin/inst/prepdisk index 5427fc61e..6bf4ec40c 100755 --- a/rc/bin/inst/prepdisk +++ b/rc/bin/inst/prepdisk @@ -14,7 +14,8 @@ fn autotype { switch($1) { case checkready - if(! test -f /dev/sd*/plan9*){ + disks=(/dev/sd*/plan9*) + if(! test -f $disks(1)){ prepdisk=notdone export prepdisk } @@ -43,7 +44,8 @@ case go disk/prep -p $disk >`{basename -d $disk}^/ctl >[2]/dev/null case checkdone - if(! test -f /dev/sd*/9fat) + disks=(/dev/sd*/9fat) + if(! test -f $disks(1)) prepdisk=ready if(! ~ $prepdisk ready) prepdisk=done