From c474f18262a31de55311b7639856bfd9016cb60f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michael=20Schr=C3=B6der?= Date: Wed, 14 May 2008 10:34:17 +0000 Subject: [PATCH] - fix host setting - use umount on build root, it's more stable --- build | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build b/build index 0c5290a..3038162 100755 --- a/build +++ b/build @@ -171,7 +171,8 @@ cleanup_and_exit () { else umount -n $BUILD_ROOT/proc 2>/dev/null || true umount -n $BUILD_ROOT/dev/pts 2>/dev/null || true - [ -n "$VM_IMAGE" ] && umount "$VM_IMAGE" 2>/dev/null || true + test "$VM_IMAGE" = 1 && VM_IMAGE= + [ -n "$VM_IMAGE" ] && umount $BUILD_ROOT 2>/dev/null || true fi exit $1 } @@ -458,11 +459,10 @@ mkdir_build_root() shopt -s nullglob -if detect_xen_2nd_stage; then +if detect_xen_2nd_stage ; then set "/.build-srcdir/$SPECFILE" -else - export HOST fi +export HOST while test -n "$1"; do PARAM="$1" @@ -887,7 +887,7 @@ for SPECFILE in "${SPECFILES[@]}" ; do umount -n $BUILD_ROOT/proc 2> /dev/null || true umount -n $BUILD_ROOT/dev/pts 2> /dev/null || true umount -n $BUILD_ROOT/mnt 2> /dev/null || true - umount $VM_IMAGE + umount $BUILD_ROOT if [ -n "$USE_XEN" ]; then XMROOT=file:$VM_IMAGE -- 2.7.4