aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-08-16 21:49:34 +0000
committerZac Medico <zmedico@gentoo.org>2007-08-16 21:49:34 +0000
commit8eef17d8a2e9dcfd839de13e90da036f44b3eff9 (patch)
treebcfd04197edb0df8bab77ed1965ee609a45d74f0 /bin/etc-update
parentmake -f/-F distinction clearer (diff)
downloadportage-8eef17d8a2e9dcfd839de13e90da036f44b3eff9.tar.gz
portage-8eef17d8a2e9dcfd839de13e90da036f44b3eff9.tar.bz2
portage-8eef17d8a2e9dcfd839de13e90da036f44b3eff9.zip
Make etc-update copy owner and group bits when it merges config files.
svn path=/main/trunk/; revision=7636
Diffstat (limited to 'bin/etc-update')
-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}