From nobody Fri Sep 02 19:36:30 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MK7Sv1gCWz4bXQR; Fri, 2 Sep 2022 19:36:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MK7Sv157Kz3qnl; Fri, 2 Sep 2022 19:36:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662147391; 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=1qRqg0xg7+vAQ0oTdSN4r4LyXNRA55AQaXAWqGNkKu4=; b=hhXuS8k0yyGV4H5c2q2N9UMp5PYEGShY2UePRtnGKbAXpoIkWNbKpXV6zkX2bMhzI0ooKC 9HUmlPcMhDPFqK46bq4t33ZK09wHhi8h+PcrCq+KDwLFaK9M9enBoD/YnG/6/6mud9w4ry D0lR/Hk1vlruqk3d/JDoOm5UKR5MRdW/VivMEkDn8Zsr9THziGXgDBSQgFz2imZ7AzsEdB to8gJ9K6+A7gqrFdNJ90GXnImI/LsrebcKDpjjqDsiN0pB735eCFs484oOjo9QzH/njMh1 dVb78GWPTfwCENc+amuEK6QsLP6QJ4sxAN0YnbFnH9fAEmmyz4puElcaqkj7ig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MK7Sv07MzzvR7; Fri, 2 Sep 2022 19:36:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 282JaUab067207; Fri, 2 Sep 2022 19:36:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 282JaUj5067206; Fri, 2 Sep 2022 19:36:30 GMT (envelope-from git) Date: Fri, 2 Sep 2022 19:36:30 GMT Message-Id: <202209021936.282JaUj5067206@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 9b17aa27406f - main - lualoader: Add loader_menu_multi_user_prompt config variable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b17aa27406f3716383e71c6687d53599a8f8d8a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662147391; 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=1qRqg0xg7+vAQ0oTdSN4r4LyXNRA55AQaXAWqGNkKu4=; b=vOlFP1Qec808cs9zkspY0diL9XT/Gyu8fom0GSo3SWGKQiiuJgQLUxaiBr25/v6W3rTn1D ejX7D5vFlAaomXHIzotar1mYNALcYiOG48aTcCdDkwqNH5S4nmpz/iSJXvXVbQhUJndGyl dkgd0+rWRcRhoEs9xzf/xeJWPRJlzo4G6mWBizBEIIQnSRo0rB97W0Uo+HIm1fqreFLxje yLtu6dDl/dUUm6/aKb6oBuyISV2xVPi8VK7TntHn2rts+ZRMly9SSZc7fNMANojWC/4lqT D3Xrk7gUF3udC+AK99/wgSiR+Qzt9VgVAR5SPzKxvy/qgfKZQg5P8f0HnzfOqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662147391; a=rsa-sha256; cv=none; b=mi0VrhOLSVW2B7a/GBvBj5SU6/f45/RQOwPDwlXpkQCEEmEUQ09VnM702m0F3CpLDqVg4T R5AvUUhp+jNuZxUkAz9uemWQ9xSuoYm+Y++QISnUNHQpTi6jbiYJCqmyBP/OSy7Qb4cxBV JX34l+QXWYVWoQ7Av8sYJWOdSCKhvamWfISNfiZENbxVeiK/coEUFRSddqeRVfjwMGpifh XhjW89b49Vmkv9sR1PgEWUVkeuY/XN8LONYyZEDezx7dXFmcZRD/IE3aqHgeABoX/Hc4GB M6nxyeBp6tcpTJHPn565TgR2BgPm6iL4DkknlzrhPcAeZCG4sZ47nZ1ecULO/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=9b17aa27406f3716383e71c6687d53599a8f8d8a commit 9b17aa27406f3716383e71c6687d53599a8f8d8a Author: Jessica Clarke AuthorDate: 2022-09-02 19:30:40 +0000 Commit: Jessica Clarke CommitDate: 2022-09-02 19:30:40 +0000 lualoader: Add loader_menu_multi_user_prompt config variable This allows the "Multi user" in "[B]oot Multi user" to be substituted with another string, for example with "Installer" in installer media. Note that this is lua-only at the moment, since loader.4th's menu.rc defines the alternate name as Boot [M]ulti User, unlike lualoader which leaves it as [B]oot Multi user. Ideally loader.4th would adopt the newer and simpler lualoader behaviour and then it could gain support for this option, but loader.4th is on the way out and isn't used by any official installer media so this is not a significant concern. Reviewed by: kevans, rpokala MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D36418 --- stand/lua/menu.lua | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/stand/lua/menu.lua b/stand/lua/menu.lua index f1a4f07a8d73..400dbf3d469b 100644 --- a/stand/lua/menu.lua +++ b/stand/lua/menu.lua @@ -60,6 +60,10 @@ local function bootenvSet(env) config.reload() end +local function multiUserPrompt() + return loader.getenv("loader_menu_multi_user_prompt") or "Multi user" +end + -- Module exports menu.handlers = { -- Menu handlers take the current menu and selected entry as parameters, @@ -263,11 +267,16 @@ menu.welcome = { all_entries = { multi_user = { entry_type = core.MENU_ENTRY, - name = color.highlight("B") .. "oot Multi user " .. - color.highlight("[Enter]"), + name = function() + return color.highlight("B") .. "oot " .. + multiUserPrompt() .. " " .. + color.highlight("[Enter]") + end, -- Not a standard menu entry function! - alternate_name = color.highlight("B") .. - "oot Multi user", + alternate_name = function() + return color.highlight("B") .. "oot " .. + multiUserPrompt() + end, func = function() core.setSingleUser(false) core.boot()