From owner-svn-src-head@freebsd.org Fri Nov 2 03:25:24 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 961A410E2D3C; Fri, 2 Nov 2018 03:25:24 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 43E5073CE2; Fri, 2 Nov 2018 03:25:24 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 21DE825064; Fri, 2 Nov 2018 03:25:24 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wA23PNjs094801; Fri, 2 Nov 2018 03:25:23 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wA23PNli094799; Fri, 2 Nov 2018 03:25:23 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201811020325.wA23PNli094799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 2 Nov 2018 03:25:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340040 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 340040 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2018 03:25:24 -0000 Author: kevans Date: Fri Nov 2 03:25:23 2018 New Revision: 340040 URL: https://svnweb.freebsd.org/changeset/base/340040 Log: lualoader: Implement boot-conf MFC after: 3 days Modified: head/stand/lua/cli.lua head/stand/lua/cli.lua.8 Modified: head/stand/lua/cli.lua ============================================================================== --- head/stand/lua/cli.lua Thu Nov 1 23:56:10 2018 (r340039) +++ head/stand/lua/cli.lua Fri Nov 2 03:25:23 2018 (r340040) @@ -115,6 +115,16 @@ function cli.autoboot(...) core.autoboot(argstr) end +cli['boot-conf'] = function(...) + local _, argv = cli.arguments(...) + local kernel, argstr = parseBootArgs(argv) + if kernel ~= nil then + loader.perform("unload") + config.selectKernel(kernel) + end + core.autoboot(argstr) +end + -- Used for splitting cli varargs into cmd_name and the rest of argv function cli.arguments(...) local argv = {...} Modified: head/stand/lua/cli.lua.8 ============================================================================== --- head/stand/lua/cli.lua.8 Thu Nov 1 23:56:10 2018 (r340039) +++ head/stand/lua/cli.lua.8 Fri Nov 2 03:25:23 2018 (r340040) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 9, 2018 +.Dd October 31, 2018 .Dt CLI.LUA 8 .Os .Sh NAME @@ -80,10 +80,11 @@ Arguments may be passed to it as usual, space-delimite As of present, the .Nm module by default provides commands for -.Ic autoboot +.Ic autoboot , +.Ic boot , and -.Ic boot . -In both cases, the +.Ic boot-conf. +In all three cases, the .Xr core.lua 8 module will load all ELF modules as-needed before executing the equivalent built-in loader commands.