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)
Sat, Mar 29, 2:07 PM
Unknown Object (File)
Sat, Mar 22, 12:16 AM
Unknown Object (File)
Sat, Mar 15, 12:36 PM
Unknown Object (File)
Feb 8 2025, 3:27 AM
Unknown Object (File)
Feb 7 2025, 1:24 AM
Unknown Object (File)
Feb 3 2025, 8:53 PM
Unknown Object (File)
Jan 25 2025, 11:55 AM
Unknown Object (File)
Jan 16 2025, 1:51 AM
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

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.