X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lbuild-initvm.sh;h=da0ef1c1748127d1394fe341b4e6d43e7ceff5b2;hb=3141739aa6baa066d17f0326854594fdef76151c;hp=9cc3fb5f1e01b70cff9aadae5ae8d43b580983d1;hpb=5ddf3b6a324a607e804ff4c6de42d276ddf5ed99;p=build.git diff --git a/lbuild-initvm.sh b/lbuild-initvm.sh index 9cc3fb5f..da0ef1c1 100755 --- a/lbuild-initvm.sh +++ b/lbuild-initvm.sh @@ -43,7 +43,7 @@ PUBLIC_BRIDGE=br0 VIF_GUEST=eth0 ########## -FEDORA_MIRROR_BASE="http://mirror.onelab.eu/fedora/" +FEDORA_MIRROR="http://mirror.onelab.eu/" FEDORA_MIRROR_KEYS="http://mirror.onelab.eu/keys/" FEDORA_PREINSTALLED="dnf dnf-yum passwd rsyslog vim-minimal dhclient chkconfig rootfiles policycoreutils openssh-server openssh-clients" DEBIAN_PREINSTALLED="openssh-server openssh-client" @@ -179,20 +179,20 @@ function fedora_download() { # copy yum config and repo files cp /etc/yum.conf $INSTALL_ROOT/etc/ - cp /etc/yum.repos.d/fedora* $INSTALL_ROOT/etc/yum.repos.d/ + cp /etc/yum.repos.d/fedora{,-updates}.repo $INSTALL_ROOT/etc/yum.repos.d/ # append fedora repo files with desired ${fedora_release} and $basearch for f in $INSTALL_ROOT/etc/yum.repos.d/* ; do sed -i "s/\$basearch/$arch/g; s/\$releasever/${fedora_release}/g;" $f done - MIRROR_URL=$FEDORA_MIRROR_BASE/releases/${fedora_release}/Everything/$arch/os + MIRROR_URL=$FEDORA_MIRROR/fedora/releases/${fedora_release}/Everything/$arch/os # since fedora18 the rpms are scattered by first name # first try the second version of fedora-release first RELEASE_URLS="" local subindex for subindex in 3 2 1; do - RELEASE_URLS="$RELEASE_URLS $MIRROR_URL/Packages/f/fedora-release-${fedora_release}-1.noarch.rpm" + RELEASE_URLS="$RELEASE_URLS $MIRROR_URL/Packages/f/fedora-release-${fedora_release}-${subindex}.noarch.rpm" done RELEASE_TARGET=$INSTALL_ROOT/fedora-release-${fedora_release}.noarch.rpm @@ -335,23 +335,12 @@ function fedora_configure_yum () { echo "Initializing yum.repos.d in $lxc" rm -f $lxc_root/etc/yum.repos.d/* - cat > $lxc_root/etc/yum.repos.d/building.repo <