Make etc-update copy owner and group bits when it merges config files.
authorZac Medico <zmedico@gentoo.org>
Thu, 16 Aug 2007 21:49:34 +0000 (21:49 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 16 Aug 2007 21:49:34 +0000 (21:49 -0000)
svn path=/main/trunk/; revision=7636

bin/etc-update

index 0daf04d40541958956a6fff1ebea9c0a31b114f1..27d7bca35e754812930720c5c20d2ec6a2e990b0 100755 (executable)
@@ -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}