summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-02-14 08:41:50 -0200
committerRenato Botelho <renato@netgate.com>2017-02-14 08:41:50 -0200
commit047620e42940dae670effaf971f58202a1fb4986 (patch)
tree642c8898657d5d31e0d09709605bb83596c13533 /tools
parentddd7e7e95c4d4666d26758728acc13409adec343 (diff)
downloadpfsense-047620e42940dae670effaf971f58202a1fb4986.zip
pfsense-047620e42940dae670effaf971f58202a1fb4986.tar.gz
Make sure $MNT is umounted
Diffstat (limited to 'tools')
-rw-r--r--tools/builder_common.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/builder_common.sh b/tools/builder_common.sh
index 5d50002..1e2293e 100644
--- a/tools/builder_common.sh
+++ b/tools/builder_common.sh
@@ -793,7 +793,8 @@ awk '
echo "/dev/ufs/cf /cf ufs ro,sync,noatime 1 1" >> ${MNT}/etc/fstab
fi
- umount ${MNT}
+ sync; sync; sync
+ umount ${MNT} || umount -f ${MNT}
# Restore the original trap
trap "mdconfig -d -u ${MD}; return" 1 2 15 EXIT
@@ -824,7 +825,8 @@ awk '
echo "/dev/ufs/cf /cf ufs ro,sync,noatime 1 1" >> ${MNT}/etc/fstab
fi
- umount ${MNT}
+ sync; sync; sync
+ umount ${MNT} || umount -f ${MNT}
# Restore the trap back
trap "mdconfig -d -u ${MD}; return" 1 2 15 EXIT
fi
@@ -849,7 +851,8 @@ awk '
clone_directory_contents ${FINAL_CHROOT_DIR}/cf ${MNT}
- umount ${MNT}
+ sync; sync; sync
+ umount ${MNT} || umount -f ${MNT}
# Restore the trap back
trap "mdconfig -d -u ${MD}; return" 1 2 15 EXIT
else
OpenPOWER on IntegriCloud