From dfe9215b4e5e5eb34f68b725797e0cf4e090b632 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Tue, 18 Nov 2014 13:38:09 +0000 Subject: [PATCH] Re-work non-persistent filesystem detection as it was not possible to detect /dev/md backed mfs filesystems that way. Differential Revision: https://reviews.freebsd.org/D1163 Approved by: ian --- usr.sbin/freebsd-update/freebsd-update.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index a8ece5bfd69d..f586909caa3f 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -604,14 +604,13 @@ fetchupgrade_check_params () { echo ${WORKDIR} exit 1 fi - for i in tmpfs mdmfs; do - if df -t ${i} ${WORKDIR} >/dev/null 2>1; then - echo -n "`basename $0`: " - echo -n "${_WORKDIR_bad2}" - echo ${WORKDIR} - exit 1 - fi - done + case `df -T ${WORKDIR}` in */dev/md[0-9]* | *tmpfs*) + echo -n "`basename $0`: " + echo -n "${_WORKDIR_bad2}" + echo ${WORKDIR} + exit 1 + ;; + esac chmod 700 ${WORKDIR} cd ${WORKDIR} || exit 1