shithub: riscv

ref: 3029059953480750c19c209cbef5700a1e1ec1d4
dir: /sys/src/9/boot/local.rc/

View raw version
#!/bin/rc

fn configlocal{
	disk=`{echo $methodarg | sed 's,(.*)!.*,\1,g'}
	fstype=`{echo $disk | sed 's,.*/(.*)$,\1,g'}
	disk=`{echo $disk | sed 's,(.*)/.*$,\1,'}

	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
	}
}