Index: usr.sbin/freebsd-update/freebsd-update.sh =================================================================== --- usr.sbin/freebsd-update/freebsd-update.sh +++ usr.sbin/freebsd-update/freebsd-update.sh @@ -2907,6 +2907,14 @@ sort -k 1,1 -t '|' $1 | tr '|' ' ' | while read FPATH TYPE OWNER GROUP PERM FLAGS HASH LINK; do + # A file may change to a directory on upgrade (PR273661). + # If that happens rm the file first so that install can create + # the directory in its place. + if [ -e "${BASEDIR}/${FPATH}" ]; then + if [ ${TYPE} = d ] && ! [ -d "${BASEDIR}/${FPATH}" ]; then + rm -f ${BASEDIR}/${FPATH} + fi + fi case ${TYPE} in d) # Create a directory