]> git.proxmox.com Git - mirror_lxc.git/commitdiff
lxc-oracle: only create media repo when --baseurl is specified
authorDwight Engen <dwight.engen@oracle.com>
Wed, 9 Apr 2014 19:20:21 +0000 (15:20 -0400)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Wed, 9 Apr 2014 19:30:08 +0000 (14:30 -0500)
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
templates/lxc-oracle.in

index 773409def868ceaa991c0b4ca2c596678ba78457..d1718afc376fcb49f73cc4d66eec70e96f400a1e 100644 (file)
@@ -701,10 +701,12 @@ container_rootfs_create()
 
         # if installing from a baseurl, create a .repo that the container
         # can use to update to _latest from http://public-yum.oracle.com
-        container_rootfs_repo_create \
-            "$container_rootfs/etc/yum.repos.d/public-yum-"$latestL""$container_release_major".repo" \
-            $latest_L""$container_release_major"_latest" \
-            $yum_url"/repo/OracleLinux/"$latest_U""$container_release_major"/latest/$basearch" gpg
+        if [ -n "$baseurl" ]; then
+            container_rootfs_repo_create \
+                "$container_rootfs/etc/yum.repos.d/public-yum-"$latestL""$container_release_major".repo" \
+                $latest_L""$container_release_major"_latest" \
+                $yum_url"/repo/OracleLinux/"$latest_U""$container_release_major"/latest/$basearch" gpg
+        fi
 
         # these distributions put the rpm database in a place the guest is
         # not expecting it, so move it