ref: 37abed6256c86e2af94435987d78a52f70656a0e
parent: 0b10d4e27dd7f940a9eab0e43e440ffe48ab0378
author: qwx <qwx@sciops.net>
date: Tue Apr 30 09:30:19 EDT 2024
vmxlinux: read entire script before executing; don't hardcode kernel cmdline
--- a/bin/vmxlinux
+++ b/bin/vmxlinux
@@ -1,4 +1,4 @@
-#!/bin/rc -e
+#!/bin/rc -be
rfork ne
vmid=`{awk '
@@ -29,7 +29,6 @@
d=/dev/sdE0/data
#v=vesa:1920x1050
v=1024x768
-c=('root=/dev/vda1')
if(test -d '#l1'){
bind -aq '#l1' /net
n=ether1
@@ -51,6 +50,8 @@
}
shift
}
+if(~ $#* 0)
+ *=('root=/dev/vda1')
echo $v | awk -Fx '
{
gsub(".*:", "")
@@ -64,4 +65,4 @@
-n ea:$mac!$n \
-v $v \
$k \
- $c $*
+ $*