- mount binfmt misc handler in chroot case
authorAdrian Schröter <adrian@suse.de>
Mon, 30 Jul 2012 13:28:56 +0000 (15:28 +0200)
committerAdrian Schröter <adrian@suse.de>
Mon, 30 Jul 2012 13:28:56 +0000 (15:28 +0200)
init_buildsystem

index a4816f7..b399d86 100755 (executable)
@@ -678,12 +678,14 @@ else
        if [ -z "$PREPARE_VM" ]; then
            if ! check_binfmt_registered; then
                echo "registering binfmt handlers"
+
                if [ -x "$BUILD_DIR/initvm" -a -e "$BUILD_DIR/qemu-reg" ]; then
                    $BUILD_DIR/initvm
                elif [ -x /usr/sbin/qemu-binfmt-conf.sh ]; then
+                  [ -e /proc/sys/fs/binfmt_misc ] || mount -n binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc
                   /usr/sbin/qemu-binfmt-conf.sh
                else
-                   echo "Warning: could not register binfmt handlers"
+                   echo "Warning: could not register binfmt handlers. Neither build-initvm nor /usr/sbin/qemu-binfmt-conf.sh exist"
                fi
            fi
            if [ -n "$PREPARE_VM" ]; then