Browse code

Merge pull request #201 from cloudbuilders/fix_noprime_again

add back NOPRIME, and explicitly install libvirt-bin

vishvananda authored on 2011/11/16 15:58:19
Showing 1 changed files
... ...
@@ -376,6 +376,8 @@ fi
376 376
 
377 377
 # - We are going to install packages only for the services needed.
378 378
 # - We are parsing the packages files and detecting metadatas.
379
+#  - If there is a NOPRIME as comment mean we are not doing the install
380
+#    just yet.
379 381
 #  - If we have the meta-keyword distro:DISTRO or
380 382
 #    distro:DISTRO1,DISTRO2 it will be installed only for those
381 383
 #    distros (case insensitive).
... ...
@@ -409,6 +411,10 @@ function get_packages() {
409 409
         OIFS=$IFS
410 410
         IFS=$'\n'
411 411
         for line in $(<${fname}); do
412
+            if [[ $line =~ "NOPRIME" ]]; then
413
+                continue
414
+            fi
415
+
412 416
             if [[ $line =~ (.*)#.*dist:([^ ]*) ]]; then # We are using BASH regexp matching feature.
413 417
                         package=${BASH_REMATCH[1]}
414 418
                         distros=${BASH_REMATCH[2]}
... ...
@@ -671,6 +677,7 @@ if [[ "$ENABLED_SERVICES" =~ "n-cpu" ]]; then
671 671
     # kvm, we drop back to the slower emulation mode (qemu).  Note: many systems
672 672
     # come with hardware virtualization disabled in BIOS.
673 673
     if [[ "$LIBVIRT_TYPE" == "kvm" ]]; then
674
+        apt_get install libvirt-bin
674 675
         sudo modprobe kvm || true
675 676
         if [ ! -e /dev/kvm ]; then
676 677
             echo "WARNING: Switching to QEMU"