From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 15222 invoked from network); 5 Jun 2022 21:23:45 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 5 Jun 2022 21:23:45 -0000 Received: from mail.posixcafe.org ([45.76.19.58]) by 9front; Sun Jun 5 17:22:18 -0400 2022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posixcafe.org; s=20200506; t=1654464135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=saCa1bC+9hsET/ErNULCwlwTKqfVHhe5ior6Ft10UnI=; b=F9zMHSfWEPdNVFFIw+boQvN77xYx5aWLvEDvWmDnD6xYZ7hP8XgMSnwoeOKC5iEEY/o8xW PjsS1GqwqZ94IcdwK+gx49L8tehnbrZmsFR0vEwYrirrTLM8buEPvfVjMQeAzd9f8eKRN7 Gm46n8L+o1kkUEHh6tvUBUZSMruppZU= Received: from [192.168.168.200] (161-97-228-135.lpcnextlight.net [161.97.228.135]) by mail.posixcafe.org (OpenSMTPD) with ESMTPSA id e7e30b2e (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <9front@9front.org>; Sun, 5 Jun 2022 16:22:14 -0500 (CDT) Message-ID: <9de319f0-7881-1e38-3c47-341ef236038c@posixcafe.org> Date: Sun, 5 Jun 2022 15:21:42 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Content-Language: en-US To: 9front@9front.org From: Jacob Moody Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: flexible flexible information ACPI core firewall Subject: [9front] [PATCH] specify argument for new kernel in reboot(1) Reply-To: 9front@9front.org Precedence: bulk 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.