#!/bin/rc rfork e fn usage{ echo 'usage: vgasetup' echo 'usage: vgasetup [-t] vgasize' exit } switch($1){ case -t shift if(~ $#* 0) usage vgasetup $1; sleep 5; vgasetup $vgasize exit case -* usage } if(~ $#* 0 || ~ $#vgasize 0){ @{rfork n; aux/realemu; aux/vga -p}|grep '^vesa mode'|awk '{printf("vgasetup %-15s\t%-10s\t%s\n",$4,$5,$6)}' echo 'you vgasize:' $vgasize echo '/dev/vgactl:' cat /dev/vgactl exit } @{rfork n; aux/realemu; aux/vga -p}|grep -s '^vesa mode .+ '^$1 if(~ $status ?*){ echo select from vgasetup exit } @{rfork n; aux/realemu; aux/vga -m $monitor -l $1}