#!/bin/rc fn showlocaldevs{ echo local devices found: for(c in /dev/sd*/ctl){ d=`{echo $c | sed 's,/ctl,,g'} echo $d':' `{sed 's/inquiry[ ]+//g; q' $c} for(i in `{awk '/^part/{print $2}' $c}) echo $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{ part=`{echo $* | sed 's,.*/([^ ]+),\1,g'} part=$part(1) switch($part){ case kfs fs must disk/kfs -n boot -f $* case cwfs fscache fsworm w0 w1 w2 w3 must cwfs64x -n boot -f $* case data must 9660srv -f $* boot case * fatal unknown partition $part } }