summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/etc-update2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/etc-update b/bin/etc-update
index 0daf04d40..27d7bca35 100755
--- a/bin/etc-update
+++ b/bin/etc-update
@@ -388,8 +388,10 @@ Please select from the menu above (-1 to exit, losing this merge): "
case ${my_input} in
1) echo "Replacing ${ofile} with ${mfile}"
if [[ ${USERLAND:-GNU} == GNU ]]; then
+ chown --reference="${ofile}" "${mfile}"
chmod --reference="${ofile}" "${mfile}"
else
+ chown "$(stat -f %Su:%Sg "${ofile}")" "${mfile}"
chmod $(stat -f %Mp%Lp "${ofile}") "${mfile}"
fi
mv ${mv_opts} ${mfile} ${ofile}