From: Thierry Parmentelat Date: Mon, 20 Jan 2014 07:32:18 +0000 (+0100) Subject: prepare a placeholder for debian-oriented code X-Git-Tag: before_libvirt_121~72 X-Git-Url: http://git.onelab.eu/?p=build.git;a=commitdiff_plain;h=f9ac8f8b810931843141204958141fd12854320d prepare a placeholder for debian-oriented code --- 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