From nobody Tue Apr 16 20:12:39 2024 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 4VJwFN2MxNz5H0Gt; Tue, 16 Apr 2024 20:12:40 +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 4VJwFM6vPzz4sr9; Tue, 16 Apr 2024 20:12:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713298360; 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=uWLTM7vmORE8MmKsa4hdndGGE11lOor9D3EhpyIRJmw=; b=OKEuPGAH4GNU8EJ0nxLGHWuv36falVA2Itp0h9s4pK7O00m0aHuoPMmbcNCDZ3nEMenWxG jTcM/qV1uVsLASxHaPQD/qqodjOJZ/65pHVSRm0m6zNacder9UX9WLLxF3o6lcYzDDyOu0 uZB0r1ihLcIbcqFlnNsGOLj10HJHZaMOv1YVjnJiWpq7zOfxAvWDMC47guA30So4kSg6Da vkLkiSTDLESXGrz5E5EXfD6MqzsANbhSi3ZSMZPycYOwDY/SxhfRp6gQ3rpYIo0lbM7LdC p434ahiwcBGaVLiRGdegTxqxQJY5sWaDfMcfOZFQKE2MA8H+QMB5Z8LKNqxhUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713298360; a=rsa-sha256; cv=none; b=sU/JdFNOt7MHSbXZ39ESYECjCgvfj4zeJ0fKuLOqQWeKU3+psYAPxr/c7pYaoeJT7iCPMR b3U+S8lWO/+Sn2Rq8KT9qzcsftAR8OSYs1NJioBB8Wu2T6jSmDV62Jgioof7R1oq6ndDpL x53nED5mC8yMfKh0koTJq+LcsX6COXBbRNt3RArIwwCMKOwOqSwb0Lxe4aSuUF4klHJkd8 aR0wEKMgmqLIK1GTIAgPYq4RvFb8cEMyEym1eN2pxtR7GqVG8raUaoy1qKO2aQMzP8XMPP bonJ4Fcmobg2hEyhkNrd3iC+HALIqhe/mqukkIDSXaPiWrjOl9mAr3iI4vUAbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713298360; 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=uWLTM7vmORE8MmKsa4hdndGGE11lOor9D3EhpyIRJmw=; b=Gl7RvAtnflMqpHHrZUOqeI7R/Y2IjpgpKUy2rA4ifaxXEmdvOPhvJw8/c3sKN+lPj4lPum 5ONLcRsMVynJBlOQrjXOA3jH2L+s5N3V3o336zQci4CU78mensLt51lgRNUGYaFsBdgD1A YTdu/WS4Lr32YaHmcbPWRM3mZVJrzPSS8a1VTr7n1A49MvL3tPyzG4xgfrXH4Pob6ThTcu SHnWkCShbphNpDCJrhPqBn+kZtW/yZsAO9w3ep9O9AhpgphGQSM8x9DiP+SntIZqnHMbSx wOIgZV3PiA8qEeyPrVNfrYy7/tfTCfIfCGxKSsb8bDkxv2kXlgA01uS0IZJipg== 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 4VJwFM6WkFzxWN; Tue, 16 Apr 2024 20:12:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43GKCdRE037563; Tue, 16 Apr 2024 20:12:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43GKCdYb037560; Tue, 16 Apr 2024 20:12:39 GMT (envelope-from git) Date: Tue, 16 Apr 2024 20:12:39 GMT Message-Id: <202404162012.43GKCdYb037560@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: 8ea26f3280f7 - stable/14 - loader: Fetch initial script from loader_lua env 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/14 X-Git-Reftype: branch X-Git-Commit: 8ea26f3280f7df1aad1c34d5bad1472a02c18fdf Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8ea26f3280f7df1aad1c34d5bad1472a02c18fdf commit 8ea26f3280f7df1aad1c34d5bad1472a02c18fdf Author: Warner Losh AuthorDate: 2024-02-14 17:51:38 +0000 Commit: Warner Losh CommitDate: 2024-04-16 19:54:23 +0000 loader: Fetch initial script from loader_lua env Sometimes it is nice to override the initial script that we run. Make it possible by fetching loader_lua from the env and using that instead of the default if prsent. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D43819 (cherry picked from commit cd147a2a024301a796f307c7bae686305d2bf302) --- stand/common/interp_lua.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stand/common/interp_lua.c b/stand/common/interp_lua.c index db58d80b2048..3f758baebc2d 100644 --- a/stand/common/interp_lua.c +++ b/stand/common/interp_lua.c @@ -123,7 +123,9 @@ interp_init(void) lua_pop(luap, 1); /* remove lib */ } - filename = LOADER_LUA; + filename = getenv("loader_lua"); + if (filename == NULL) + filename = LOADER_LUA; if (interp_include(filename) != 0) { const char *errstr = lua_tostring(luap, -1); errstr = errstr == NULL ? "unknown" : errstr;