From: Zac Medico Date: Thu, 16 Aug 2007 21:58:52 +0000 (-0000) Subject: Make etc-update copy owner and group bits when it merges config files. (branches... X-Git-Tag: v2.1.2.12~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f653539fb30b5eca5b983d9ab935e89eddd0be41;p=portage.git Make etc-update copy owner and group bits when it merges config files. (branches/2.1.2 r7637) svn path=/main/branches/2.1.2.9/; revision=7638 --- 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}