If someone reads /run/host/os-release at the exact same time it is being updated, and it is large enough, they might read a half-written file. This is very unlikely as os-release is typically small and very rarely changes, but it is not impossible. Bind mount a staging directory instead of the file, and symlink the file into into, so that we can do atomic file updates and close this gap. Atomic replacement creates a new inode, so existing bind mounts would continue to see the old file, and only new services would see the new file. The indirection via the directory allows to work around this, as the directory is fixed and never changes so the bind mount is always valid, and its content is shared with all existing services. Fixes https://github.com/systemd/systemd/issues/28794 Follow-up for 3f37a82545d461ab (cherry picked from commit 663e27564ff4529b04da0ddc96804eb4e084a043)
System and Service Manager
Details
Most documentation is available on systemd's web site.
Assorted, older, general information about systemd can be found in the systemd Wiki.
Information about build requirements is provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the Code Map for information about this repository's layout and content.
Please see the Hacking guide for information on how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list or join our IRC channel.
Stable branches with backported patches are available in the stable repo.