2.1 Command Line
loregd is configured entirely by its argument vector. It takes one or more hive declarations, each naming a hive and the SQLite database file that backs it:
loregd <hive-name>=<database-path> [<hive-name>=<database-path> ...]
The placeholders name a hive and its absolute database path. peinit selects
Machine=/var/state/loregd/Machine.hive and
Users=/var/state/loregd/Users.hive for its registry service. The daemon
has no built-in database-path defaults.
Each argument is split at its first =, so a database path can
itself contain =.
Every declared hive is registered with the kernel at startup (§2.2).
2.1.1 Argument validation #
loregd rejects the invocation and exits with status 1 if any of the following hold:
| Condition | Reason |
|---|---|
| No hive arguments at all | At least one hive is required. |
An argument with no = | Not a hive declaration. |
| An empty hive name or empty path | Neither is meaningful. |
| A relative database path | Paths are required to be absolute. |
A hive name containing \, /, or NUL | These are path separators and terminators in the registry namespace. |
The hive name CurrentUser, in any case | Reserved by the kernel as a per-token alias; no source can claim it. |
| Two declarations of the same hive name | Duplicates are detected on the folded name, so Machine and MACHINE collide. |
Hive-name comparison is case-insensitive throughout; for duplicate detection here, and for routing requests later; but the case as written on the command line is preserved and is what loregd presents to the kernel when it registers.
2.1.2 Unsupported recovery switches #
The argument parser accepts hive declarations only. It has no help, version,
inspection, restore, or clearing switches. In particular, --inspector,
--recover-from-backup, and --dangerously-clear-database fail validation
because they lack =.
Startup backup and repair limits describes the distinction between WAL recovery and a saved backup.
2.1.3 Configuration #
loregd has no configuration file and reads no configuration from the registry. This is deliberate: loregd is the configuration store, and a store that had to read its own configuration to start could not start.
Everything about how it behaves comes from three places: the command-line arguments above, the contents of the SQLite databases they name, and compiled-in constants (§4.1).
NOTIFY_SOCKET is the one environment variable loregd consults, and it
carries no behavioral setting.
When
it is set, loregd treats it as a service-manager readiness socket: once
the hives are registered and the request loop is about to begin, it
connects and sends READY=1\n. Connection and write share a one-second
deadline. Failure produces a warning and startup continues.
When it is unset, the step is skipped.
loregd writes ordinary progress to standard output and faults to standard error. peinit captures both streams during Phase 1: if loregd fails before readiness, peinit relays the captured diagnostic output to the console; after the log service starts, the pre-eventd buffer carries both streams into eventd. This keeps early-boot failures visible without bypassing the system log.