fix(systemd): set right permissions for the machine-id file
Set the right permissions for the /etc/machine-id file.
Checklist
- [X] I have tested it locally
- [ ] I have reviewed and updated any documentation if relevant
- [ ] I am providing new code and test(s) for it
Fixes #1864
Writing
uninitialized\nto it, according to https://systemd.io/BUILDING_IMAGES/
I think the first boot semantics makes no sense in initrd, hence etc/machine-id should be empty (https://www.freedesktop.org/software/systemd/man/machine-id.html#First%20Boot%20Semantics).
Writing
uninitialized\nto it, according to https://systemd.io/BUILDING_IMAGES/I think the first boot semantics makes no sense in initrd, hence
etc/machine-idshould be empty (https://www.freedesktop.org/software/systemd/man/machine-id.html#First%20Boot%20Semantics).
Right, thanks for pointing me to the right place in the doc. The other place in the code (which is much more recent than this) that writes the machine-id if it's empty confused me.
https://github.com/dracutdevs/dracut/blob/fe8fa2b0cadbb33e27c8dd8b5851548dcd65835c/modules.d/35network-manager/module-setup.sh#L67-L73
LGTM