]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
oracle template: use url arg to wget repo file
authorDwight Engen <dwight.engen@oracle.com>
Mon, 7 Jan 2013 19:02:39 +0000 (14:02 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 8 Jan 2013 17:06:59 +0000 (12:06 -0500)
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
templates/lxc-oracle.in

index 6a64a338f984c4c2ba0229e9fcd23027bf2c9427..4ccec9fa5b26ba1e8c12d0d7540225b431a61cb0 100644 (file)
@@ -397,7 +397,11 @@ container_rootfs_create()
         echo "Downloading release $container_release_major.$container_release_minor for $basearch"
 
         # get yum repo file
-        public_yum_url=http://public-yum.oracle.com
+        if [ -n "$repourl" ]; then
+            yum_url=$repourl
+        else
+            yum_url=http://public-yum.oracle.com
+        fi
         if   [ $container_release_major = "5" ]; then
             repofile=public-yum-el5.repo
         elif [ $container_release_major = "6" ]; then
@@ -406,9 +410,9 @@ container_rootfs_create()
             die "Unsupported release $container_release_major"
         fi
         mkdir -p $container_rootfs/etc/yum.repos.d
-        wget -q $public_yum_url/$repofile -O $container_rootfs/etc/yum.repos.d/$repofile
+        wget -q $yum_url/$repofile -O $container_rootfs/etc/yum.repos.d/$repofile
         if [ $? -ne 0 ]; then
-            die "Failed to download repo file $public_yum_url/$repofile"
+            die "Failed to download repo file $yum_url/$repofile"
         fi
 
         # yum will take $basearch from host, so force the arch we want