From: Alexandre Létourneau Date: Mon, 30 Mar 2015 22:19:27 +0000 (-0400) Subject: Added a more reliable test for yum --releasever in the centos template X-Git-Tag: lxc-2.0.0.beta1~339^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87a92d42cee68cd78e99e99b713299a53589e73f;p=thirdparty%2Flxc.git Added a more reliable test for yum --releasever in the centos template Signed-off-by: Alexandre Létourneau --- 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"