From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.bissa.eu ([176.10.215.156]) by ewsd; Wed Nov 20 07:58:55 EST 2019 Received: from [0.0.0.0] (unknown [23.129.64.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: petter9@bissa.eu) by smtp.bissa.eu (Postfix) with ESMTPSA id 4ED5456F068 for <9front@9front.org>; Wed, 20 Nov 2019 13:58:33 +0100 (CET) Subject: Re: [9front] Booting with encrypted partitions To: 9front@9front.org References: <6D03C80655D49FAF0B96B481DCDEFA30@eigenstate.org> From: petter9@bissa.eu Message-ID: Date: Wed, 20 Nov 2019 13:58:15 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <6D03C80655D49FAF0B96B481DCDEFA30@eigenstate.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=bissa.eu; s=170404; t=1574254722; bh=Gb/PXtLQrhf2EYBu9P8T/ZFwv6Y=; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=QCdkRNhZZt0sPD3xIcoPtDag0lRVUheQaKpTH2W2Q2uoJwrFYLHaYgKrAtq6OyWOeMoi+bXQ2wWZhiAAm+YiOV9giEcp+3wJ+EsNTqVQ2KWJOVMV2WjZXleE9BEe0cKPXRDZ9Pp/OIH1buBj4qS+3JWUiJoUw7LmSouyux1XFEE= Content-Transfer-Encoding: quoted-printable List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: method engine I like having the hook before the loop now too, as cinap suggested.=C2=A0= In=20 the scenario of a user having a partition decryption command in this=20 hook and aborting the password prompt; they can now try their different=20 boot options without having an annoying password prompt appearing all=20 the time.=C2=A0 (The prompt is just a reboot away should they want it aga= in.) diff -r 8f9f3ee2eacf sys/src/9/boot/bootrc --- a/sys/src/9/boot/bootrc Mon Nov 11 13:35:47 2019 -0800 +++ b/sys/src/9/boot/bootrc Wed Nov 20 11:55:12 2019 +0100 @@ -186,6 +186,12 @@ # add partitions and binds configlocal =20 +# execute hook 'startcmd' from plan9.ini +if(! ~ $#startcmd 0) { + echo $startcmd + eval $startcmd +} + while(){ @{main} I went with 'startcmd', which is still open for debate.. I can help with updating the fqa if something like this patch is committe= d. Come to think of; there's also the possibility of having a bootrc.local=20 (mimicking termrc and cpurc).=C2=A0 I actually think that seems like a be= tter=20 path going forward, but i haven't made any attempts at that. -- Petter