diff options
Diffstat (limited to 'bin/etc-update')
-rwxr-xr-x | bin/etc-update | 4 |
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} |