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.0.8~168 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fa64b00063581958777819eaf3be8e1570e63cd;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 d809f3f82..deef1885c 100644 --- a/templates/lxc-centos.in +++ b/templates/lxc-centos.in @@ -403,7 +403,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