]> granicus.if.org Git - sudo/commitdiff
"mv -f" on HP-UX doesn't unlink the destination first so add
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 23 Jul 2010 15:23:04 +0000 (11:23 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 23 Jul 2010 15:23:04 +0000 (11:23 -0400)
an explicit rm before moving the temporary into place.

--HG--
branch : 1.7

install-sh

index c8d2b7023982f6e621771e7ede053f9e27ef0f50..7a207e2d502c941647925048e15ef44c642f66ce 100755 (executable)
@@ -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