X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lbuild-initvm.sh;h=864d99651cb6652b305ebb2ea9b4baa800e9900e;hb=f9ac8f8b810931843141204958141fd12854320d;hp=30f846368934e2ab7d54ff04fd8650c92956e575;hpb=e2d56776da652f0ec5d6e472cedfc3deb1dae27b;p=build.git diff --git a/lbuild-initvm.sh b/lbuild-initvm.sh index 30f84636..864d9965 100755 --- a/lbuild-initvm.sh +++ b/lbuild-initvm.sh @@ -581,23 +581,26 @@ function setup_lxc() { exit 1 fi - install_fedora - if [ $? -ne 0 ]; then - echo "failed to install fedora" - exit 1 - fi - - configure_fedora - if [ $? -ne 0 ]; then - echo "failed to configure fedora for a container" - exit 1 - fi - - if [ "$(echo $fcdistro | cut -d"f" -f2)" -le "14" ]; then - configure_fedora_init - else - configure_fedora_systemd - fi + pkg_method=$(package_method $fcdistro) + case $pkg_method in + yum) + install_fedora || { echo "failed to install fedora"; exit 1 ; } + configure_fedora || { echo "failed to configure fedora for a container"; exit 1 ; } + if [ "$(echo $fcdistro | cut -d"f" -f2)" -le "14" ]; then + configure_fedora_init + else + configure_fedora_systemd + fi + ;; + debootstrap) + echo "$COMMAND: no support for debootstrap-based systems - yet" + exit 1 + ;; + *) + echo "$COMMAND:: unknown package_method - exiting" + exit 1 + ;; + esac # Enable cgroup mkdir $rootfs_path/cgroup