don't umount /dev
authorLudwig Nussel <ludwig.nussel@suse.de>
Thu, 26 Jun 2008 13:59:29 +0000 (13:59 +0000)
committerLudwig Nussel <ludwig.nussel@suse.de>
Thu, 26 Jun 2008 13:59:29 +0000 (13:59 +0000)
when using qemu as user init_buildsystem outside the vm cannot create devices so one has to rely on udev populating /dev.

build

diff --git a/build b/build
index 3870765..4119ed6 100755 (executable)
--- a/build
+++ b/build
@@ -361,15 +361,14 @@ detect_xen_2nd_stage()
            sleep 1
        done
        test $i = 1 || echo
-    fi
-#why would one want to do that?? Breaks all kinds of things
-# XXX: why wait for it and then recreate?
-    umount -l /dev 2>/dev/null
-    if test -n "$XENSWAP" ; then
-       rm -f "$XENSWAP"
-       umask 027
-       mknod "$XENSWAP" b 3 2
-       umask 022
+       # recreate the swap device manually if it didn't exist for some
+       # reason, hardcoded to hda2 atm
+       if ! test -b "$XENSWAP" ; then
+           rm -f "$XENSWAP"
+           umask 027
+           mknod "$XENSWAP" b 3 2
+           umask 022
+       fi
        swapon -v "$XENSWAP" || exit 1
     fi
     HOST="$MYHOSTNAME"