Expand description
Runtime distro detection.
Reads /etc/os-release once at startup and caches the result. All parts
of the daemon that need to make distro-specific decisions (primarily the
executor’s package management dispatch) call current().
§Design
Action names are universal — AddLayeredPackage means “install a package”
regardless of distro. The commands that implement those actions differ:
rpm-ostree on Fedora Atomic, apt on Ubuntu. The executor’s build_action_spec
checks the distro and delegates to the appropriate action module.
Adding support for a new distro means:
- Add a variant here (e.g.
ArchLinux). - Update
detect()to recognise it viaID=in/etc/os-release. - Create
crates/sysknife-daemon/src/actions/<distro>.rswith the distro-specificActionSpecbuilders. - Add match arms in
executor::build_action_specfor the new variant.
See HACKING.md §18 for the full checklist.
Enums§
- Distro
- Detected Linux distribution family.
Functions§
- current
- Return the detected distro, cached after the first call.