]> 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>
Mon, 16 Mar 2015 17:36:31 +0000 (13:36 -0400)
Signed-off-by: tukiyo3 <tukiyo3@gmail.com>
templates/lxc-centos.in

index dd9b25424d7711fdd3d5a0e88e00a2573c5d398d..1588042ebb0f88238e6994b970d12ad97a118ba6 100644 (file)
@@ -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