From nobody Thu Jan 13 09:49:08 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 51DFB12D236F; Thu, 13 Jan 2022 09:49:11 +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 4JZKQF3csHz4j6b; Thu, 13 Jan 2022 09:49:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642067349; 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=cGi1SB88w9Ba+eVa5BioGBUNFkueop170wTqHYcZHb0=; b=IhFXCCRyTIcUJXX+VZQSNIAUkeUqfriClOyjsT02dfYEmfFyvx5MsBg1zBDXic86J7Ug3x laTsfaF3A+lTcKQKBhBnD4KM9sUNpZi6v+/aPl52YyIAwam/0NGgbtgfy5p/QkuR6g3t4X 0bspAc/ZjKSyTssRlOqJhA12Qf+yKY9bzKYfdrkWDm/50pdPAS9qEZX4CcO2uzosM7YFOZ JpduWAJkCx9Cvq2MJ3JeeNhQpASdJMbl7HndBer1oqB7lwECNlAtIBb0kugerAXflj0kcy u1dcZSULgz6lEi4oYvgVKEQzQLEoBFZDPhgBuu7p9maEeKYIS+TCZ0/bqgKJWQ== 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 1AFA21E229; Thu, 13 Jan 2022 09:49:09 +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 20D9n9iC096002; Thu, 13 Jan 2022 09:49:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20D9n8MJ096001; Thu, 13 Jan 2022 09:49:08 GMT (envelope-from git) Date: Thu, 13 Jan 2022 09:49:08 GMT Message-Id: <202201130949.20D9n8MJ096001@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 28d2b8b70047 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 28d2b8b70047f6f3a6cc0d02c5090d333f7a61cb Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642067349; 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=cGi1SB88w9Ba+eVa5BioGBUNFkueop170wTqHYcZHb0=; b=OBettm+wIwXbQbmijN3asK88Q5Pvd5PEWiWSPVms8x5y28TYdWDPHArr0ZT6B3NaBaseeg L0cYvJ5oNUgH0HnNY9tkiuwAKIteFDk5kyMIRsQ9kEvRvZYnoHSRK+PqHcctPJPNyAkTaE Kg9cGkq1uo9HpR955W36Ud8SBTNE5NokPCAe/uljmcdxLheEeGbB6jR2AV3HYgjsd7C5ko wcCTjrG48yBKPO/vgRb62pTqzrKPlL/EXxCOykDzR7H0qpVJsxhyHctWs7wntQZD9S+z3Q ITWtB5sravpx+E/BN/3spjVD4P42IPEqyii782UYBsLUARgF+Ei6rEinZ3n2Aw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642067349; a=rsa-sha256; cv=none; b=sl30LQ9AzHWW3kkI60aNsj9Q9BGMkK4azerD5DhoCiBFYwq9v0FvvHb5NhN5KfY986RcMP /BJ/YCaBnCWTzDLusSrZL0QOz5wtl/MyrdAz5e/Qomqvyks65/Q8kQ/FUR5wNSwIuxBS7f xS6TtHhZGvoZYvJd4pnTTREgSgW67TStVzxW7xKNyePtJh9DGR0gbb9ENqGXlEpYgA8iCr I6wAXBu9JeZ5OrjR6IW1EIdmUg+H8PTP6cOqXSaFGu0iUyjZIqUPE4+2/UTQEO1QBTGV+5 drQ7kfMb+wN9HzL8YhHPrMbcDPPhtxqUOPj4uwylzzJngUiDO4GX2SbDsN+sJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=28d2b8b70047f6f3a6cc0d02c5090d333f7a61cb commit 28d2b8b70047f6f3a6cc0d02c5090d333f7a61cb Author: Emmanuel Vadot AuthorDate: 2021-12-13 13:18:12 +0000 Commit: Emmanuel Vadot CommitDate: 2022-01-13 07:58:54 +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 (cherry picked from commit c4dc907254a4275d8f3ecd9a6b615c6e2a2438e9) --- 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.