ref: 5127a388df95d10671e41a6f7ddddee8dff3ed32
dir: /sys/src/9/boot/local.rc/
#!/bin/rc
fn showlocaldevs{
echo local devices found:
for(c in /dev/sd*/ctl){
if(test -r $c){
d=`{echo $c | sed 's,/ctl,,g'}
echo $d':' `{sed 's/inquiry[ ]+//g; q' $c}
for(i in `{ls -p $d | grep -v -e 'ctl|raw'})
echo $d'/'$i `{fstype $d'/'$i}
echo
}
}
}
fn configlocal{
if(~ $pcload 1){
kern=`{echo $* | sed 's,.*!(.*)$,\1,g'}
# for now we only allow kernels in the same dev/part of $methodargs
if(~ $#kern 0 || ! ~ $#bootfile 0)
kern=`{echo $bootfile | sed 's,.*!(.*)$,\1,g'}
}
diskparts
}
fn connectlocal{
t=`{fstype $1}
if(~ $#t 0)
fatal unknown fstype $1
switch($t){
case 9660
t=9660srv
case kfs
t=disk/kfs
}
{$t -s -f $* &} <[0=1] | echo 0 >/srv/boot
}