Changeset View
Changeset View
Standalone View
Standalone View
head/stand/lua/loader.lua
Show All 24 Lines | |||||
-- SUCH DAMAGE. | -- SUCH DAMAGE. | ||||
-- | -- | ||||
-- $FreeBSD$ | -- $FreeBSD$ | ||||
-- | -- | ||||
local config = require("config") | local config = require("config") | ||||
local menu = require("menu") | local menu = require("menu") | ||||
local password = require("password") | local password = require("password") | ||||
local local_module | |||||
local result, errstr, errnoval = lfs.attributes("/boot/lua/local.lua") | |||||
-- Effectively discard any errors; we'll just act if it succeeds. | |||||
if result ~= nil then | |||||
local_module = require("local") | |||||
end | |||||
-- Declares a global function cli_execute that attempts to dispatch the | -- Declares a global function cli_execute that attempts to dispatch the | ||||
-- arguments passed as a lua function. This gives lua a chance to intercept | -- arguments passed as a lua function. This gives lua a chance to intercept | ||||
-- builtin CLI commands like "boot" | -- builtin CLI commands like "boot" | ||||
function cli_execute(...) | function cli_execute(...) | ||||
local argv = {...} | local argv = {...} | ||||
-- Just in case... | -- Just in case... | ||||
if #argv == 0 then | if #argv == 0 then | ||||
Show All 21 Lines |