diff options
author | Alex Musolino <alex@musolino.id.au> | 2022-05-11 16:33:37 +0000 |
---|---|---|
committer | Alex Musolino <alex@musolino.id.au> | 2022-05-11 16:33:37 +0000 |
commit | 51669adf2446385b38bab4efcb4133c19e9be806 (patch) | |
tree | a9fc4cdb5d85e3e28858b765a95e8a097f1ce1da /rc/bin | |
parent | 3cf83fa259b70ab6289b9106c04da7c27d4b34d1 (diff) |
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
Diffstat (limited to 'rc/bin')
-rwxr-xr-x | rc/bin/inst/prepdisk | 6 |
1 files 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 |