From 6d41f7dfa6faadc1140837185515bf8722d8746f Mon Sep 17 00:00:00 2001 From: tukiyo Date: Tue, 17 Feb 2015 10:05:25 +0900 Subject: [PATCH] no such option: --releasever on CentOS5's yum Signed-off-by: tukiyo3 --- templates/lxc-centos.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.47.2