diff --git a/libexec/rc/rc.d/tmp b/libexec/rc/rc.d/tmp --- a/libexec/rc/rc.d/tmp +++ b/libexec/rc/rc.d/tmp @@ -40,10 +40,16 @@ mount_tmpmfs() { - if ! /bin/df /tmp | grep -q "^/dev/md[0-9].* /tmp"; then - mount_md ${tmpsize} /tmp "${tmpmfs_flags}" - chmod 01777 /tmp - fi + while read line; do + case $line in + /dev/md[0-9]*\ /tmp) + return;; + esac + done <<*EOF +$(df /tmp) +*EOF + mount_md ${tmpsize} /tmp "${tmpmfs_flags}" + chmod 01777 /tmp } # If we do not have a writable /tmp, create a memory