Date: Wed, 21 Feb 2018 14:07:54 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329709 - head/stand/lua Message-ID: <201802211407.w1LE7sLk087561@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans Date: Wed Feb 21 14:07:53 2018 New Revision: 329709 URL: https://svnweb.freebsd.org/changeset/base/329709 Log: lualoader: Don't autodetect kernels if 'kernels' is explicitly set Modified: head/stand/lua/core.lua Modified: head/stand/lua/core.lua ============================================================================== --- head/stand/lua/core.lua Wed Feb 21 14:05:13 2018 (r329708) +++ head/stand/lua/core.lua Wed Feb 21 14:07:53 2018 (r329709) @@ -188,7 +188,7 @@ end function core.kernelList() local k = loader.getenv("kernel") - local v = loader.getenv("kernels") or "" + local v = loader.getenv("kernels") local kernels = {} local unique = {} @@ -199,12 +199,18 @@ function core.kernelList() unique[k] = true end - for n in v:gmatch("([^; ]+)[; ]?") do - if unique[n] == nil then - i = i + 1 - kernels[i] = n - unique[n] = true + if v ~= nil then + for n in v:gmatch("([^; ]+)[; ]?") do + if unique[n] == nil then + i = i + 1 + kernels[i] = n + unique[n] = true + end end + + -- We will not automatically detect kernels to be displayed if + -- loader.conf(5) explicitly set 'kernels'. + return kernels end -- Automatically detect other bootable kernel directories using a
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802211407.w1LE7sLk087561>