diff options
author | Renato Botelho <renato@netgate.com> | 2017-02-14 08:41:50 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-02-14 08:42:36 -0200 |
commit | cc423d0fa7e16c8c24b9de32ee11092b8dcae21a (patch) | |
tree | 2a21ff8c735658003a4e52e61956164f6e633b32 /tools | |
parent | d5b5fd078c2ab2b7fd269736004bd07dcc49c142 (diff) | |
download | pfsense-cc423d0fa7e16c8c24b9de32ee11092b8dcae21a.zip pfsense-cc423d0fa7e16c8c24b9de32ee11092b8dcae21a.tar.gz |
Make sure $MNT is umounted
Diffstat (limited to 'tools')
-rw-r--r-- | tools/builder_common.sh | 9 |
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 |