Use appropriate fsyncs to persist the rewritten /etc/motd file, when a
rewrite is performed.
Details
Details
- Reviewers
vangyzen allanjude - Commits
- rS349256: rc.d/motd: Update motd more robustly
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
As mjg@ points out, the mktemp file may be on a different filesystem than /etc
(e.g., tmpfs, but any other filesystem invalidates the initial fsync). Copy to
a temporary /etc file, sync that, then rename over /etc/motd.