HomeFreeBSD

etcupdate: preserve the metadata of the destination file

Description

etcupdate: preserve the metadata of the destination file

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.

Reviewed by: bapt
Sponsored by: Dell Technologies
Differential Revision: https://reviews.freebsd.org/D7817

Details

Provenance
vangyzenAuthored on Sep 8 2016, 3:53 PM
Parents
rGa6be46901402: - Fix typo
Branches
Unknown
Tags
Unknown