aa5408e2e8a66b71f38531f1dcb91252c586a23c
On certain distributions such as NixOS the mtime of `/etc/hosts` is locked to a fixed value. In such cases, only checking the last mtime of `/etc/hosts` is not enough - we also need to check if the st_ino/st_dev match up. Thus, let's make sure make sure that systemd-resolved also rereads `/etc/hosts` if the inode or the device containing `/etc/hosts` changes. Test script: ```bash hosts="/etc/hosts" echo "127.0.0.1 testpr" > "hosts_new" mv "hosts_new" "$hosts" resolvectl query testpr || exit 1 mtime="$(stat -c %y "$hosts")" echo "127.0.0.1 newhost" > "hosts_tmp" touch -d "$mtime" "hosts_tmp" install -p "hosts_tmp" "$hosts" sleep 10 resolvectl query newhost || exit 1 rm -f "hosts_tmp" ``` Closes #14456.
System and Service Manager
Details
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 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.
Languages
C
88.5%
Shell
5.7%
Python
4.6%
Meson
1.1%
