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
F167652887: D7817.diff
Sun, Aug 23, 1:15 PM
Unknown Object (File)
Sat, Aug 22, 7:07 AM
Unknown Object (File)
Fri, Aug 21, 9:20 PM
Unknown Object (File)
Fri, Aug 21, 9:20 PM
Unknown Object (File)
Fri, Aug 21, 9:19 PM
Unknown Object (File)
Thu, Aug 20, 7:09 AM
Unknown Object (File)
Mon, Jul 27, 7:52 AM
Unknown Object (File)
Jul 5 2026, 1:25 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

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.