* [9front] [PATCH] specify argument for new kernel in reboot(1)
@ 2022-06-05 21:21 Jacob Moody
0 siblings, 0 replies; only message in thread
From: Jacob Moody @ 2022-06-05 21:21 UTC (permalink / raw)
To: 9front
This allows kernel configuration to be modified through
additional arguments to reboot.
; reboot /amd64/9pc64 'nobootprompt=tcp!'
---
diff df92301d8fc8310fbfdf3de91b97a156ca0504d4 uncommitted
--- a//rc/bin/reboot
+++ b//rc/bin/reboot
@@ -1,2 +1,11 @@
#!/bin/rc
-echo reboot $* > /dev/reboot
+rfork e
+
+kern=$1
+shift
+for(i in $*){
+ kv=`'=' {echo -n $i}
+ echo $kv(2) >> '#ec/'$kv(1)
+}
+
+echo reboot $kern > /dev/reboot
--- a//sys/man/8/fshalt
+++ b//sys/man/8/fshalt
@@ -11,6 +11,9 @@
[
.I kernelpath
]
+[
+.IR key=value ...
+]
.br
.B scram
.SH DESCRIPTION
@@ -41,6 +44,16 @@
is specified then the machine will load and start that
kernel directly instead of returning to the system rom. (see
.IR cons (3)).
+The new kernel inherits the existing configuration stored
+in
+.B #ec
+(see
+.IR env (3)).
+Additional arguments in the form
+.I key=value
+will be overwrite keys in
+.B #ec
+before rebooting.
.PP
.I Scram
shuts down the machine it is invoked on.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-05 21:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-05 21:21 [9front] [PATCH] specify argument for new kernel in reboot(1) Jacob Moody
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).