HomeFreeBSD

etcupdate: Preserve permissions when installing a resolved file.

Description

etcupdate: Preserve permissions when installing a resolved file.

Similar to the change in 1a04446f088c79cc2cf85fd86e60ebcc228d3075, use
cat to overwrite the contents of the existing file rather than cp so
that metadata of the existing file such as permissions and ownership
is preserved.

PR: 255514
Reported by: uqs

(cherry picked from commit f8287caae48246e34d6a7af5446df3c36127b7f0)

Details

Provenance
jhbAuthored on May 25 2022, 9:20 PM
Parents
rGc4aa309d232c: etcupdate: Don't rotate trees for a dry run.
Branches
Unknown
Tags
Unknown