README (2192B)
1 # Kanit 2 3 Toy init system 4 5 ## Testing 6 7 To test Kanit, the following dependencies are needed: 8 * `qemu` (`qemu-system-x86_64`) 9 * `expect` 10 * `curl` 11 * `rust` 12 * `just` 13 14 Once all dependencies are installed, Kanit can be tested in a vm by running `just`. 15 The vm's password is set to nothing by default. 16 17 ## Controller 18 19 Kanit can be controlled with `kanit`. 20 21 ### Units 22 23 Units are written in TOML and can be loaded for next boot with `kanit service enable <unit> [level]`. 24 They must be stored at `/etc/kanit` to be found by `kanit`. Units are only ran at boot. 25 26 Units can be disabled at next boot with `kanit service disable <unit> [level]` and all enabled units can be 27 displayed with `kanit service list`. 28 29 ### Blame 30 31 The time each unit takes to run can be viewed with `kanit blame` (or sorted with `kanit blame -s`). 32 33 ### Power 34 35 The system can be powered off, rebooted, halted, and rebooted with kexec with `kanit <op>` with an 36 optional `-f` flag to bypass the init. In addition, the standard `poweroff`, `reboot`, and `halt` 37 commands can be used. 38 39 ## Goal 40 41 Kanit aims to be minimal with the ability to be rolled into a single executable (multicall). 42 43 ## Todo 44 45 (In no particular order) 46 47 * [x] Fix compiling with `x86_64-unknown-linux-gnu` 48 * [ ] Service supervision 49 * [x] `kanit-supervisor` 50 * [ ] Avoid spawning new process and integrate directly into `init` 51 * [ ] Record logs 52 * [ ] Dynamically loading units 53 * [ ] Move `kanit-rc/services/*` to unit files instead 54 * [ ] Allow unit files to be baked into the init 55 * [x] Allow unit files to be loaded at startup 56 * [ ] (Re)loading units 57 * [ ] Configuration 58 * [x] Enabled units list 59 * [x] Concurrency 60 * [ ] More graceful fail over 61 * [x] Emergency shell 62 * [x] Allow for continuing when unit fails to start 63 * [ ] Allow for panic recovery (unable to do with `panic = "abort"`) 64 * [x] Split `kanit-rc/src/init` to separate crate 65 * [ ] Consider moving `kanit-rc/init/*` to unit files 66 * [ ] `*dev` 67 * [x] `mdev` 68 * [ ] `udev` 69 * [ ] Testing 70 * [x] Smoke test 71 * [ ] Unit tests 72 * [ ] Syslog 73 * [x] Busybox 74 * [ ] Custom 75 * [ ] Logging 76 * [x] Startup logger 77 * [ ] Runtime logger 78 * [x] Shutdown 79 80 ## Credit 81 82 * OpenRC/Alpine for init scripts