Page MenuHomeFreeBSD

etcupdate: preserve the metadata of the destination file
ClosedPublic

Authored by vangyzen on Sep 7 2016, 6:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 12, 3:52 PM
Unknown Object (File)
Sun, Oct 12, 3:52 PM
Unknown Object (File)
Sun, Oct 12, 3:52 PM
Unknown Object (File)
Sun, Oct 12, 4:41 AM
Unknown Object (File)
Sun, Oct 5, 7:03 AM
Unknown Object (File)
Thu, Sep 18, 1:47 AM
Unknown Object (File)
Sep 13 2025, 9:52 AM
Unknown Object (File)
Sep 4 2025, 5:45 PM
Subscribers

Details

Summary

When using diff3 to perform a three-way merge, etcupdate lost the destination
file's metadata. The metadata from the temporary file were used instead.
This was unpleasant for rc.d scripts, which require execute permission.
Use "cat >" to overwrite the destination file's contents while preserving its
metadata.

Test Plan

All kyua tests still pass, although they don't test this case.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

vangyzen retitled this revision from to etcupdate: preserve the metadata of the destination file.
vangyzen updated this object.
vangyzen edited the test plan for this revision. (Show Details)
vangyzen added reviewers: jhb, bapt.
bapt edited edge metadata.
This revision is now accepted and ready to land.Sep 8 2016, 3:49 PM
This revision was automatically updated to reflect the committed changes.