shithub: rc

ref: 7a9a85d8860dad2ab86846627c6f0036662bc9b9
dir: /vmxlinux/

View raw version
#!/bin/rc
rfork n

fn clean{
	for(i in '#X'/*/ctl)
		echo quit > $i
}

fn sigexit{
	clean
}

fn sigint{
	clean
}

ver=5.11.22_1
mac=2ec3bc946389
n=ether0
M=12G
k=/tmp/vmx/vmlinuz-$ver
m=/tmp/vmx/initramfs-^$ver^.img
d=/dev/sdE0/data
v=vesa:1280x1024
c=('root=/dev/vda1')
while(~ $1 -?){
	switch($1){
	case -d; d=$2; shift;
	case -e; d=($d -d $2); shift;
	case -k; k=$2; shift;
	case -l; psd listen || aux/listen;
	case -M; M=$2; shift;
	case -m; m=$2; shift;
	case -n; n=$2; shift;
	case --; break;
	case *
		echo usage: $0 [opts] [--] [more opts]
		exit usage
	}
	shift
}
echo scroll >/dev/wctl
vmx \
	-d $d \
	-M $M \
	-m $m \
	-n ea:$mac!$n \
	-v $v \
	$k \
	$c $*