From nobody Thu Dec 16 10:53:26 2021 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 4258B18F1156; Thu, 16 Dec 2021 10:53:29 +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 4JF89M2G6dz4fCS; Thu, 16 Dec 2021 10:53:27 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 B167D2EB5C; Thu, 16 Dec 2021 10:53:26 +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 1BGArQJP091256; Thu, 16 Dec 2021 10:53:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BGArQq1091255; Thu, 16 Dec 2021 10:53:26 GMT (envelope-from git) Date: Thu, 16 Dec 2021 10:53:26 GMT Message-Id: <202112161053.1BGArQq1091255@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: c4dc907254a4 - main - loader: lua: test that /boot exists first 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c4dc907254a4275d8f3ecd9a6b615c6e2a2438e9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639652007; 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=1JM2aP1eUwnnrMwWBbNWbqUamO61okboDMlzaYeE2Js=; b=JDSWavusgWKctGg7YlUQQe3ESaGb/98I/IsXJvfT+VfS9VI5DaviIzP/Gh7m90jpmzt1eO y+dn1/XyYfjmupQiiil4A+dj2ZUh34kAXONtTrYgnUIvIntH+zv6QWM4eaMbZ36Q/KoV2F 3PXl4bzKI4uc3ZBCk20Te3amP5MYZdu+zZskvJfCwpLaoP21Mms6fLo1HGN6PHx4/GsJ5+ 3cKHvGcE5LeR3qZHOE8pxlgNdlXN0Mjz8Y29+qNaSjuLW5DTe0/EzK4l2qLvXfQ4NxnzRx ZiqIJ6dT9hfJT3ksyQtzbjqNl58x4HtDb5USQoU9XvHNPsG+PnOVWbUnoxQ0/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639652007; a=rsa-sha256; cv=none; b=t5PFeAEIqziPs7sjdE/Mb6Cjrmpk7tS9gFsDXlhxYGHW2SJkNTkU7Ro5kfZKgOZDdgXzbg IcsNWZCrVTG+OSSqw5KWlBMiH911JqP+bqj1v1r+IrO/bYz6qTAX8a1eA7YBwlqgRSqTbQ 8jjF6ckfQ1xiGK5LGF2Mc5/MO8dCV069TbClRJy/a0VeNvXXuIxuQJ0LskgsrkpsTQ8sC9 K139Pyn1rb3LC7QbSXu4hwGqRiMQtrn1Cd3zp41E9D8sv3sdnOy+iJylv5vTsYIoQRkm/W kfXtee+x+E+J3YLQrfyw0Wx/HQ+l7r2NTrhY+D6wrM6IWF0W/secZhi0SqOVzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=c4dc907254a4275d8f3ecd9a6b615c6e2a2438e9 commit c4dc907254a4275d8f3ecd9a6b615c6e2a2438e9 Author: Emmanuel Vadot AuthorDate: 2021-12-13 13:18:12 +0000 Commit: Emmanuel Vadot CommitDate: 2021-12-16 10:50:45 +0000 loader: lua: test that /boot exists first Otherwise on fs like tftp where no directory listing is possible we fail on the .dir method. Reviewed by: imp, kevans MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33414 --- stand/lua/core.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stand/lua/core.lua b/stand/lua/core.lua index 55c26e0d6d39..67d51b992858 100644 --- a/stand/lua/core.lua +++ b/stand/lua/core.lua @@ -229,6 +229,13 @@ function core.kernelList() end end + -- Do not attempt to autodetect if underlying filesystem + -- do not support directory listing (e.g. tftp, http) + if not lfs.attributes("/boot", "mode") then + autodetect = "no" + loader.setenv("kernels_autodetect", "NO") + end + -- Base whether we autodetect kernels or not on a loader.conf(5) -- setting, kernels_autodetect. If it's set to 'yes', we'll add -- any kernels we detect based on the criteria described.