tweak PATH for debootstrap
[build.git] / lbuild-initvm.sh
index e5fef49..0395fe1 100755 (executable)
@@ -249,7 +249,7 @@ function fedora_install() {
             fedora_download || { echo "Failed to download 'fedora base'"; return 1; }
         else
             echo "Updating cache $cache/rootfs ..."
-           if ! yum --installroot $cache/rootfs -y --nogpgcheck update 
+           if ! yum --installroot $cache/rootfs -y --nogpgcheck update ; then
                 echo "Failed to update 'fedora base', continuing with last known good cache"
             else
                 echo "Update finished"
@@ -506,9 +506,11 @@ function debian_install () {
     set -e
     set -x
     mkdir -p $rootfs_path
-    arch=$(canonical_arch $personality)
+    arch=$(canonical_arch $personality $fcdistro)
     mirror=$(debian_mirror $fcdistro)
-    debootstrap --arch $arch $fcdistro $rootfs_path $mirror
+    # old guests have mount in /bin but this is no longer part of 
+    # the standard PATH in recent hosts
+    PATH=$PATH:/bin:/sbin debootstrap --arch $arch $fcdistro $rootfs_path $mirror
 }
 
 function debian_configure () {