Skip to content

Commit

Permalink
Update boot.md
Browse files Browse the repository at this point in the history
  • Loading branch information
probonopd authored Feb 24, 2023
1 parent 34f935c commit c8e9192
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion developer/boot.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,17 @@ Directly above this, there is
try_include("local")
```

which seems to suggest that we can hook in our own code there by creating a new file `/boot/lua/local.lua` with our custom code.
which seems to suggest that we can hook in our own code there by creating a new file `/boot/lua/local.lua` with our custom code:

```
local color = require("color")
-- loader.* functions are not part of normal lua, where are they documented?
printc("Hello World", COLOR_BLUE)
loader.delay(5*1000*1000)
```

* https://man.freebsd.org/cgi/man.cgi?query=core.lua documents the functions in `core.lua`
* https://man.freebsd.org/cgi/man.cgi?query=menu.lua&sektion=8 documents `menu.lua`, including an example for how to replace the default boot menu with a simple boot menu, and en example for how to add another option to the default FreeBSD welcome menu
Expand Down

0 comments on commit c8e9192

Please sign in to comment.