summaryrefslogtreecommitdiffstats
path: root/bin/etc-update
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-08-16 21:56:51 +0000
committerZac Medico <zmedico@gentoo.org>2007-08-16 21:56:51 +0000
commit61c8aeb691f262d7cc9e67c8656362f5508cb561 (patch)
tree1efb0ff625e08fb8f2460050dd2bb6d0cae0fce7 /bin/etc-update
parent2e0c953ae72b5f23642a06842ed88a64c802e827 (diff)
downloadportage-61c8aeb691f262d7cc9e67c8656362f5508cb561.tar.gz
portage-61c8aeb691f262d7cc9e67c8656362f5508cb561.tar.bz2
portage-61c8aeb691f262d7cc9e67c8656362f5508cb561.zip
Make etc-update copy owner and group bits when it merges config files. (trunk r7636)
svn path=/main/branches/2.1.2/; revision=7637
Diffstat (limited to 'bin/etc-update')
-rwxr-xr-xbin/etc-update4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/etc-update b/bin/etc-update
index a6378a142..27d7bca35 100755
--- a/bin/etc-update
+++ b/bin/etc-update
@@ -387,9 +387,11 @@ Please select from the menu above (-1 to exit, losing this merge): "
my_input=$(read_int)
case ${my_input} in
1) echo "Replacing ${ofile} with ${mfile}"
- if [[ ${USERLAND} == GNU ]]; then
+ 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}