From b3eeaf70817cb2542d411ad2ecbc635525b9da4a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexandre=20L=C3=A9tourneau?= Date: Mon, 30 Mar 2015 18:19:27 -0400 Subject: [PATCH] =?utf8?q?Added=20a=20more=20reliable=20test=20for=20yum?= =?utf8?q?=20--releasever=20in=20the=20centos=20template=20Signed-off-by:?= =?utf8?q?=20Alexandre=20L=C3=A9tourneau=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- templates/lxc-centos.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/lxc-centos.in b/templates/lxc-centos.in index 1588042eb..85d4f3768 100644 --- a/templates/lxc-centos.in +++ b/templates/lxc-centos.in @@ -413,10 +413,10 @@ download_centos() # download a mini centos into a cache echo "Downloading centos minimal ..." - if [ $release -le 5 ];then - YUM="yum --installroot $INSTALL_ROOT -y --nogpgcheck" - else + if [ $(yum -h | grep 'releasever=RELEASEVER') ];then YUM="yum --installroot $INSTALL_ROOT -y --nogpgcheck --releasever=$release" + else + YUM="yum --installroot $INSTALL_ROOT -y --nogpgcheck" fi PKG_LIST="yum initscripts passwd rsyslog vim-minimal openssh-server openssh-clients dhclient chkconfig rootfiles policycoreutils" -- 2.47.2