blob: d585e40b7ae0ecb7a6c3b3840c1b1109b57fe9fd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# Vigil TODO list
## Reminders
- Never panic from non-critical failures (e.g. non-root filesystem mount failure).
- All errors should be logged.
- Configuration via TOML.
## Roadmap
### System init
- [x] Mount filesystems (`/proc`, `/sys`, `/dev`).
- [x] Spawn `udev` (or compatible device manager) as child process.
- [x] Mount user-defined filesystems from `/etc/fstab`
- [x] Activate `swap`
- [x] Set hostname, timezone, and locale from config.
- [x] Load kernel modules (via `modprobe` or direct `init_module` syscall).
### Core runtime features
- [ ] **Service management**
- [x] Parse TOML unit files (`/etc/vigil/units/*.toml`)
- [ ] Start/stop/restart/status via `vigilctl`
- [x] Handle Runlevels
- [x] Auto-restart failed services (configurable via option `restart = always|on-failure|never`)
- [x] **Child process reaping**
- [x] Install `SIGCHLD` handler
- [x] Call `waitpid(-1, ...)` in loop to reap zombies
- [ ] Log exit status, signal, and runtime duration per service
- [ ] **TTY & login**
- [ ] Launch `getty` on configured TTYs (e.g. `tty1`–`tty6`)
- [ ] Support custom `getty` paths/args per TTY in config
### System lifecycle control
- [ ] Handle `reboot`, `halt`, `poweroff` via `vigilctl`
- [ ] Properly terminate all services in reverse dependency order
- [x] Sync filesystems and unmount (best-effort)
- [x] Invoke `reboot(2)` / `halt(2)` syscalls directly
### Signal handling
- [x] `SIGINT` / `SIGTERM` = graceful shutdown
- [x] `SIGUSR1` / `SIGUSR2` = reload config or trigger debug dump
- [ ] Block all non-fatal signals during critical sections (e.g. mount)
### Logging
Logging should not stop on printing colored messages to stdout
in addition, we __should__ send logs to /var/log/vigil.log or smth simmilar.
<!-- Also time to think how and where to store service logs, create generic /usr/local/log/vigil/*service_name*; or store them with /var/log/vigil/*service_name* etc.)-->
|