#!/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 must 9660srv -f $* boot case kfs must disk/kfs -n boot -f $* case * must $t -n boot -f $* } }