shithub: rc

ref: 1a1f86d7ec058bbb1acb7ace0a71332ff61aa3b3
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 $*