From: tukiyo Date: Tue, 17 Feb 2015 01:05:25 +0000 (+0900) Subject: no such option: --releasever on CentOS5's yum X-Git-Tag: lxc-1.1.1~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35035bfe8024fbca56f222f996ecf620e53dab1d;p=thirdparty%2Flxc.git no such option: --releasever on CentOS5's yum Signed-off-by: tukiyo3 --- diff --git a/templates/lxc-centos.in b/templates/lxc-centos.in index dd9b25424..1588042eb 100644 --- a/templates/lxc-centos.in +++ b/templates/lxc-centos.in @@ -413,7 +413,11 @@ download_centos() # download a mini centos into a cache echo "Downloading centos minimal ..." - YUM="yum --installroot $INSTALL_ROOT -y --nogpgcheck --releasever=$release" + if [ $release -le 5 ];then + YUM="yum --installroot $INSTALL_ROOT -y --nogpgcheck" + else + YUM="yum --installroot $INSTALL_ROOT -y --nogpgcheck --releasever=$release" + fi PKG_LIST="yum initscripts passwd rsyslog vim-minimal openssh-server openssh-clients dhclient chkconfig rootfiles policycoreutils" # use temporary repository definition