X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lbuild-initvm.sh;h=e9c13e6af904ff45565c663772a3523303c6e911;hb=015e930f2db1101985e6c3c3ccf03473df33dcf1;hp=2f27397716b5ac9344e93f8bc4538383ffb1dcb7;hpb=3aa5e047733851962127f68ff284dcba6d953143;p=build.git diff --git a/lbuild-initvm.sh b/lbuild-initvm.sh index 2f273977..e9c13e6a 100755 --- a/lbuild-initvm.sh +++ b/lbuild-initvm.sh @@ -166,9 +166,12 @@ function fedora_download() { RELEASE_URL1="$MIRROR_URL/Packages/fedora-release-$release-1.noarch.rpm" # with fedora18 the rpms are scattered by first name RELEASE_URL2="$MIRROR_URL/Packages/f/fedora-release-$release-1.noarch.rpm" + # with fedora21 somehow this one came numbered -2 + RELEASE_URL2="$MIRROR_URL/Packages/f/fedora-release-$release-2.noarch.rpm" + RELEASE_TARGET=$INSTALL_ROOT/fedora-release-$release.noarch.rpm found="" - for attempt in $RELEASE_URL1 $RELEASE_URL2; do + for attempt in $RELEASE_URL1 $RELEASE_URL2 $RELEASE_URL3; do if curl -f $attempt -o $RELEASE_TARGET ; then echo "Retrieved $attempt" found=true @@ -453,9 +456,11 @@ function setup_lxc() { # Enable cgroup -- xxx -- is this really useful ? [ -d $lxc_root/cgroup ] || mkdir $lxc_root/cgroup - # set up resolv.conf + ### set up resolv.conf from host + # ubuntu precise and on, /etc/resolv.conf is a symlink to ../run/resolvconf/resolv.conf + [ -h $lxc_root/etc/resolv.conf ] && rm -f $lxc_root/etc/resolv.conf cp /etc/resolv.conf $lxc_root/etc/resolv.conf - # and /etc/hosts for at least localhost + ### and /etc/hosts for at least localhost [ -f $lxc_root/etc/hosts ] || echo "127.0.0.1 localhost localhost.localdomain" > $lxc_root/etc/hosts # grant ssh access from host to guest