2011-04-16 20:42:16 +00:00
|
|
|
#!/bin/rc
|
|
|
|
|
2011-04-19 05:24:46 +00:00
|
|
|
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}
|
2011-04-19 01:58:29 +00:00
|
|
|
for(i in `{ls -p $d | grep -v -e 'ctl|raw'})
|
2011-04-19 05:24:46 +00:00
|
|
|
echo $d'/'$i
|
|
|
|
echo
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-04-16 20:42:16 +00:00
|
|
|
fn configlocal{
|
2011-04-19 05:24:46 +00:00
|
|
|
if(~ $pcload 1){
|
|
|
|
kern=`{echo $* | sed 's,.*!(.*)$,\1,g'}
|
2011-04-16 20:42:16 +00:00
|
|
|
|
2011-04-19 05:24:46 +00:00
|
|
|
# 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'}
|
|
|
|
}
|
2011-04-16 20:42:16 +00:00
|
|
|
diskparts
|
2011-04-19 05:24:46 +00:00
|
|
|
|
2011-04-16 20:42:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn connectlocal{
|
2011-04-19 05:24:46 +00:00
|
|
|
part=`{echo $* | sed 's,.*/([^ ]+),\1,g'}
|
|
|
|
part=$part(1)
|
|
|
|
switch($part){
|
2011-04-18 06:33:38 +00:00
|
|
|
case kfs fs
|
2011-04-19 05:24:46 +00:00
|
|
|
must disk/kfs -n boot -f $*
|
2011-04-18 06:33:38 +00:00
|
|
|
case cwfs fscache fsworm w0 w1 w2 w3
|
2011-04-19 05:24:46 +00:00
|
|
|
must cwfs64x -n boot -f $*
|
2011-04-16 20:42:16 +00:00
|
|
|
case data
|
2011-04-19 05:24:46 +00:00
|
|
|
must 9660srv -f $* boot
|
2011-04-16 20:42:16 +00:00
|
|
|
case *
|
2011-04-19 05:24:46 +00:00
|
|
|
fatal unknown partition $part
|
2011-04-16 20:42:16 +00:00
|
|
|
}
|
|
|
|
}
|