Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Sep 2019 03:38:19 +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: r352314 - head/stand/lua
Message-ID:  <201909140338.x8E3cJpc087258@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Sat Sep 14 03:38:18 2019
New Revision: 352314
URL: https://svnweb.freebsd.org/changeset/base/352314

Log:
  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.
  
  MFC after:	1 week

Modified:
  head/stand/lua/cli.lua
  head/stand/lua/cli.lua.8

Modified: head/stand/lua/cli.lua
==============================================================================
--- head/stand/lua/cli.lua	Sat Sep 14 03:30:34 2019	(r352313)
+++ head/stand/lua/cli.lua	Sat Sep 14 03:38:18 2019	(r352314)
@@ -125,6 +125,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: head/stand/lua/cli.lua.8
==============================================================================
--- head/stand/lua/cli.lua.8	Sat Sep 14 03:30:34 2019	(r352313)
+++ head/stand/lua/cli.lua.8	Sat Sep 14 03:38:18 2019	(r352314)
@@ -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 :



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909140338.x8E3cJpc087258>