diff options
| author | Kyle Evans <kevans@FreeBSD.org> | 2026-04-08 12:49:18 +0000 |
|---|---|---|
| committer | Kyle Evans <kevans@FreeBSD.org> | 2026-04-08 12:49:58 +0000 |
| commit | bf0881060ecd75ce79683b82ebcd4809eadf7cf5 (patch) | |
| tree | 5c3e7d721bebcc08cd13a07b516e93bb54ef0271 /libexec/talkd/(public-mirror) | |
| parent | 19ab46cc66045ea936475f1a1e08763eb2fd663e (diff) | |
This allows something like the following local.lua to install a filter
to implement its own notion of hidden BEs using a naming convention of
a leading dot to hide them:
-- file: /boot/lua/local.lua
local core = require("core")
local function be_hide(be)
if core.isSingleUserBoot() then
-- All BEs are accepted for single-user
return true
end
local name = be:match("/([^/]+)$")
if not name then
-- Accept malformed BEs, for whatever reason
return true
end
return name:match("^%.") == nil
end
if core.bootenvFilter then
-- Just in case we need to be compatible with older versions of
-- core.lua without the filtering functionality.
core.bootenvFilter(be_hide)
end
-- EOF
Requested by: Marek Zarychta
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55359
Diffstat (limited to 'libexec/talkd/(public-mirror)')
0 files changed, 0 insertions, 0 deletions
