ref: 2f4e6dd1a8b367044948f75f62b51aae2a944dd2
dir: /sys/src/9/boot/local.rc/
#!/bin/rc
fn configlocal{
disk=`{echo $methodarg | sed 's,(.*)!.*,\1,g'}
fstype=`{echo $disk | sed 's,.*/(.*)$,\1,g'}
disk=`{echo $disk | sed 's,(.*)/.*$,\1,'}
if(~ $pcload 1){
kern=`{echo $methodarg | 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{
rm -f /srv/boot
switch($fstype){
case kfs fs
must disk/kfs -n boot -f $disk^/$fstype
case cwfs fscache fsworm w0 w1 w2 w3
must cwfs64x -n boot -f $disk^/$fstype
case data
must 9660srv -f $disk^/$fstype boot
case *
fatal unknown partition $fstype
}
}