From owner-svn-src-stable@freebsd.org Sun Oct 6 04:01:16 2019 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 37FCDF9C3F; Sun, 6 Oct 2019 04:01:16 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46m8zv5kpVz4X1H; Sun, 6 Oct 2019 04:01:15 +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 A961E1F72A; Sun, 6 Oct 2019 04:01:15 +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 x9641FVF039521; Sun, 6 Oct 2019 04:01:15 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9641FPP039280; Sun, 6 Oct 2019 04:01:15 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201910060401.x9641FPP039280@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 6 Oct 2019 04:01:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r353136 - in stable: 11/stand/lua 12/stand/lua X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/stand/lua 12/stand/lua X-SVN-Commit-Revision: 353136 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Oct 2019 04:01:16 -0000 Author: kevans Date: Sun Oct 6 04:01:15 2019 New Revision: 353136 URL: https://svnweb.freebsd.org/changeset/base/353136 Log: MFC r352314: lualoader: Add reload-conf loader command This command will trigger a reload of the configuration from disk. This is useful if you've changed currdev from recovery media to local disk as much as I have over the past ~2 hours and are tired of the extra keystrokes. This is really just a glorified shortcut, but reload-conf is likely easier to remember for other people and does save some keystrokes when reloading the configuration. It is also resilient to the underlying config method changing interface, but this is unlikely to happen. Modified: stable/11/stand/lua/cli.lua stable/11/stand/lua/cli.lua.8 Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/stand/lua/cli.lua stable/12/stand/lua/cli.lua.8 Directory Properties: stable/12/ (props changed) Modified: stable/11/stand/lua/cli.lua ============================================================================== --- stable/11/stand/lua/cli.lua Sun Oct 6 03:59:05 2019 (r353135) +++ stable/11/stand/lua/cli.lua Sun Oct 6 04:01:15 2019 (r353136) @@ -126,6 +126,10 @@ cli['boot-conf'] = function(...) core.autoboot(argstr) end +cli['reload-conf'] = function(...) + config.reload() +end + -- Used for splitting cli varargs into cmd_name and the rest of argv function cli.arguments(...) local argv = {...} Modified: stable/11/stand/lua/cli.lua.8 ============================================================================== --- stable/11/stand/lua/cli.lua.8 Sun Oct 6 03:59:05 2019 (r353135) +++ stable/11/stand/lua/cli.lua.8 Sun Oct 6 04:01:15 2019 (r353136) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 31, 2018 +.Dd September 13, 2019 .Dt CLI.LUA 8 .Os .Sh NAME @@ -82,14 +82,27 @@ As of present, the module by default provides commands for .Ic autoboot , .Ic boot , +.Ic boot-conf , and -.Ic boot-conf. -In all three cases, the +.Ic reload-conf . +.Pp +For +.Ic autoboot , +.Ic boot , +and +.Ic boot-conf , +the .Xr core.lua 8 module will load all ELF modules as-needed before executing the equivalent built-in loader commands. All non-kernel arguments to these commands are passed in the same order to the loader command. +.Pp +The +.Ic reload-conf +command will reload the configuration from disk. +This is useful if you have manually changed currdev and would like to easily +reload the configuration from the new device. .Ss Exported Functions The following functions are exported from .Nm :