Skip to content

Commit

Permalink
cat
Browse files Browse the repository at this point in the history
  • Loading branch information
laffer1 committed Jul 3, 2023
1 parent af00742 commit 0407fe6
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions usr.sbin/etcupdate/etcupdate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -673,8 +673,9 @@ install_resolved()
return 1
fi

log "cp -Rp ${CONFLICTS}$1 ${DESTDIR}$1"
cp -Rp ${CONFLICTS}$1 ${DESTDIR}$1 >&3 2>&1
# Use cat rather than cp to preserve metadata
log "cat ${CONFLICTS}$1 > ${DESTDIR}$1"
cat ${CONFLICTS}$1 > ${DESTDIR}$1 2>&3
post_install_file $1
return 0
}
Expand Down Expand Up @@ -1612,6 +1613,18 @@ EOF
cat $WARNINGS
fi

# If this was a dryrun, remove the temporary tree if we built
# a new one.
if [ -n "$dryrun" ]; then
if [ -n "$dir" ]; then
if [ -n "$rerun" ]; then
panic "Should not have a temporary directory"
fi
remove_tree $dir
fi
return
fi

# Finally, rotate any needed trees.
if [ "$new" != "$NEWTREE" ]; then
if [ -n "$rerun" ]; then
Expand Down

0 comments on commit 0407fe6

Please sign in to comment.