This commit is contained in:
Raven Scott
2026-04-03 18:02:05 -04:00
parent ec236f9cc7
commit 24d221209c
20 changed files with 167 additions and 18 deletions
+3 -1
View File
@@ -14,10 +14,12 @@ Files in this directory are **read from disk by the seeder** (or copied into `pa
## Contents
- **`init.js`** — Kernel entry: must define `async function start(ctx)`. Reads `/etc/os-release`, prints a short banner, loops on `readLine` / `execLine` (with error handling so user mistakes do not tear down the session). Custom kernels may call **`ctx.registerKernelShutdownHook(fn)`** to run teardown when the session ends (before initd disposers); see [`developer-guide/02-the-context-object.md`](../developer-guide/02-the-context-object.md).
- **`init.js`** — Kernel entry: must define `async function start(ctx)`. Reads `/etc/os-release`, optional **`/etc/motd`**, runs non-comment lines from **`/etc/bare-os/rc`** via **`execLine`**, prints a short banner, then loops on `readLine` / `execLine` (with error handling so user mistakes do not tear down the session). Custom kernels may call **`ctx.registerKernelShutdownHook(fn)`** to run teardown when the session ends (before initd disposers); see [`developer-guide/02-the-context-object.md`](../developer-guide/02-the-context-object.md).
- **`bin/`** — **Tier-1 utilities** built by [bare-os-coreutils](../packages/bare-os-coreutils/README.md). Each file is **`runtime.js`** + optional **`lib/*-engine.js`** (**`sed`**, **`awk`**) or **`lib/man-render.js`** (**`man`**) + **`async function run(ctx, argv)`** (no ESM **`import`** in **`src/`**).
- **`share/man/man.json`** — Merged manual database for **`/bin/man`** (built by **`bare-os-coreutils`**; see [handbook ch.10](../handbook/10-manpages-and-online-help.md)).
- **`etc/os-release`** — Static OS metadata (`NAME`, `VERSION`, …).
- **`etc/motd`** — Optional message printed after **`os-release`** (distributors can customize).
- **`etc/bare-os/rc`** — Optional boot snippet: non-comment, non-blank lines are passed to **`execLine`** one at a time (same power as the interactive shell—keep lines minimal and trusted).
## Editing workflow