From nobody Tue Jan 24 22:12:24 2023 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 4P1h6J6qYFz3bfpd; Tue, 24 Jan 2023 22:12:24 +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 4P1h6J67Qlz3CqF; Tue, 24 Jan 2023 22:12:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598344; 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=UFNdKZed26QUWxYWJ2aTOJEXAYYh+oTTwfXOMuepnnc=; b=uJoTOTaqSLNGfe6sDE8wXNrqtD0ROwr7ZkSBr6qeeeCizOU9kYZNmf1CrfTPwrq0ykPXzb 5ThnUQrMFqZnSEVhgAuncQ0B0BklRxerUN+OipGyRgDCPla2YCUxb/EjGrKVV/xzGnT/6x TgHwMqviYyczZvtvB/rKplThUHBRhSbx0dL8ZrPZkUXX8o0C/KTfTj0qTT3VGtb+h/4Spv kYAgd2bUfaVl2E/bXbN3m67D8gHVnBLW5LRdnK7dguDPQ/qBLYOErB2BOe97Ub1ghthMx5 It9K8wdLKkTHWFeLBXERVSY8lnfNBqKs4L0UonuNSIWcl3Xyq15IbzvIcvyRGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598344; 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=UFNdKZed26QUWxYWJ2aTOJEXAYYh+oTTwfXOMuepnnc=; b=eoYhVm54RfSgEyuI8rKvgwRpEPd4mlwbgP8OX3i846xgCvHNPjSCcJv84F18XkDCf+uZRM 6WatMcXKxI5Lx+YN8H6jsZdfW/aO4HV+vlOP1pUJcYwqITgA+gYLVuwVElSyFE/61k+UT6 SAmOedVMXVgbbT4fbeM8cxTtC2sio1cncgXuL/CmWKZKjds4lvvIG1FjYX3xmE9QWsUMeE ZOwKD2gTCi/iC4iKPFoTBOPkiWwJPA11LXKjimCr7I1JQXOyoxI5wUpCerjM8IXtxowABm ybuA0hGChKJJYbi9c+XntuI2BRk71iPET6VJ3HuI8pte+UMCPmuyh1BeYcy6hQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674598344; a=rsa-sha256; cv=none; b=e3dty00s+D85X2c14sltoHVpFpz4tUwEIQq6i0tVmtxsYhJNHS9c/O98nbL3fxBs7jWAWg khF8QsD24g6J//n2qTnaLee5wO+dy29b+3a3Nqwzfv5qRQIXlamRX95Yn36NqwnWCXULsF 4ln9I2pqu7EIsxsX0pfusRA4AQwkev6jCY0+Ana8isOq93hdQYtBiTpp9Qfw+boo787PmL pWHr3Ye+g0v8vsLapcITmGaummSIYI3/Uj6QwT28ldidoL/spJLIDWHRy6o8QmG1Ky35JW 69wUuCgGD3TV1kx5EzvA7LYg33YgCBkV8EvFoMk7Xy0KrxeUAG/EJkTJRyZvkA== 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 4P1h6J5BcKzQfD; Tue, 24 Jan 2023 22:12:24 +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 30OMCOYZ086982; Tue, 24 Jan 2023 22:12:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30OMCOx2086981; Tue, 24 Jan 2023 22:12:24 GMT (envelope-from git) Date: Tue, 24 Jan 2023 22:12:24 GMT Message-Id: <202301242212.30OMCOx2086981@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: ffe0cd442311 - stable/13 - 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ffe0cd442311819d308ac9837d8b674d9a5c9804 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ffe0cd442311819d308ac9837d8b674d9a5c9804 commit ffe0cd442311819d308ac9837d8b674d9a5c9804 Author: Jessica Clarke AuthorDate: 2022-09-02 19:30:40 +0000 Commit: Warner Losh CommitDate: 2023-01-24 21:49:33 +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 (cherry picked from commit 9b17aa27406f3716383e71c6687d53599a8f8d8a) --- 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()