From: Todd C. Miller Date: Fri, 23 Jul 2010 15:23:04 +0000 (-0400) Subject: "mv -f" on HP-UX doesn't unlink the destination first so add X-Git-Tag: SUDO_1_7_4~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ba4751f3e4432453ec4a6cf5e2a2694b194427b9;p=sudo "mv -f" on HP-UX doesn't unlink the destination first so add an explicit rm before moving the temporary into place. --HG-- branch : 1.7 --- diff --git a/install-sh b/install-sh index c8d2b7023..7a207e2d5 100755 --- a/install-sh +++ b/install-sh @@ -209,8 +209,10 @@ if [ X"$1" != X"$2" ] ; then fi ## Copy source to the right dir, then move to right spot. ## Done in two parts so we can hope for atomicity. + ## We need to rm DEST due to bugs in "mv -f" on some systems. ${RM} -f "${TEMP}" || exit 1 ${CP} "$1" "${TEMP}" || exit 1 + ${RM} -f "${DEST}" || exit 1 ${MV} -f "${TEMP}" "${DEST}" || exit 1 fi fi