From: Jacob Moody <moody@mail.posixcafe.org>
To: 9front@9front.org
Subject: [9front] [PATCH] Preserve nobootprompt
Date: Thu, 9 Jun 2022 11:14:57 -0600 [thread overview]
Message-ID: <0a6586df-9f96-b4bf-d910-9b2430787a71@posixcafe.org> (raw)
In our bootrc we currently completely blank out
nobootprompt. If you are attempting to do a warm
reboot into another kernel, it is quite annoying
to respecify it for each boot. We were blanking it
(seemingly) due to how rc(1) stashes lists in to /env/, which is
using a null between list members. This would cause the kernel
to skip all arguments past the first when doing successive reboots.
Instead we can 'flatten' the variable back in to '#ec' on the way
out to preserve things how we found them.
---
diff 1b5ea51ee1203952900fafc0def48985d900f7a7 uncommitted
--- a//sys/src/9/boot/bootrc
+++ b//sys/src/9/boot/bootrc
@@ -74,7 +74,6 @@
ask bootargs ' is (tcp, tls, il, local!device)' $"bootargs
}
if not bootargs=$nobootprompt
- nobootprompt=()
mn=`{echo $bootargs | sed 's,!, ,'}
ma=$mn(2-)
mn=$mn(1)
@@ -146,6 +145,9 @@
if not
init=($init -t)
}
+
+ if(! ~ $#nobootprompt 0)
+ echo -n $nobootprompt > '#ec/nobootprompt'
# remove enviroment variables
rm -f '#e/'^$mt '#e/'? '#e/'?? '#e/fn#'*
reply other threads:[~2022-06-09 17:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0a6586df-9f96-b4bf-d910-9b2430787a71@posixcafe.org \
--to=moody@mail.posixcafe.org \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).