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)
Thu, Nov 13, 8:24 PM
Unknown Object (File)
Thu, Nov 13, 9:18 AM
Unknown Object (File)
Sat, Nov 8, 2:39 PM
Unknown Object (File)
Wed, Nov 5, 1:05 PM
Unknown Object (File)
Thu, Oct 30, 8:00 PM
Unknown Object (File)
Sun, Oct 26, 7:28 AM
Unknown Object (File)
Sat, Oct 25, 4:55 AM
Unknown Object (File)
Fri, Oct 24, 10: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.