better hint about missing fstab entry
authorLudwig Nussel <ludwig.nussel@suse.de>
Tue, 30 Mar 2010 09:32:55 +0000 (11:32 +0200)
committerLudwig Nussel <ludwig.nussel@suse.de>
Tue, 30 Mar 2010 09:38:36 +0000 (11:38 +0200)
build

diff --git a/build b/build
index a2d4af0..01297ff 100755 (executable)
--- a/build
+++ b/build
@@ -1021,7 +1021,12 @@ if test -z "$RUNNING_IN_VM" ; then
        if [ -w /root ]; then
            mount -o loop $VM_IMAGE $BUILD_ROOT || cleanup_and_exit 3
        else
-           mount $BUILD_ROOT || cleanup_and_exit 3
+           if ! mount $BUILD_ROOT; then
+               echo "mounting the build root failed. An fstab entry is probably missing or incorrect."
+               echo "/etc/fstab should contain an entry like this:"
+               echo "$VM_IMAGE $BUILD_ROOT auto noauto,user,loop 0 0"
+               cleanup_and_exit 3
+           fi
        fi
     else
        test -w /root || become_root_or_fail