]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
no such option: --releasever on CentOS5's yum
authortukiyo <tukiyo3@gmail.com>
Tue, 17 Feb 2015 01:05:25 +0000 (10:05 +0900)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 14 Aug 2015 16:44:32 +0000 (12:44 -0400)
Signed-off-by: tukiyo3 <tukiyo3@gmail.com>
templates/lxc-centos.in

index d809f3f82fbc633bbfd5b1f6be9ae161f0f3c22f..deef1885cc87aa9affc830264a3f04289ec5d842 100644 (file)
@@ -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