ref: 3fbd9f07c8ce1a8fe1910d2edf71cda3dcf5703e
dir: /sys/src/9/boot/usb.rc/
fn configusb{
for(c in /dev/sdU*[0-9]){
d=`{echo $c | sed 's,^/dev/(.*),\1p,g'}
if(! test -d /dev/$d)
disk/partfs -d $d $c/data
}
}
fn connectusb{
m=/mnt/dosusb
if(! test -r $1)
fatal device $1 does not exist
if(! test -r $1/dos)
fatal device $1 does not have a dos partition
mkdir -p $m
dossrv -r -f $1/dos dosusb
mount /srv/dosusb $m
if(! test -r $m/9front.iso)
fatal $m/9front.iso not found
{9660srv -s -f $m/9front.iso &} <[0=1] | echo 0 >/srv/boot
}
musb=(configusb connectusb)
mt=(musb $mt)