shithub: rc

ref: 047477cdd9442f930aba6bcf7f19b92f2b58a8db
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
}

n=ether0
M=1G
k=/tmp/vmx/vmlinuz-5.4.12_1
m=/tmp/vmx/initramfs-5.4.12_1.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 $n \
	-v vesa:1280x1024 \
	$k \
	$c $*