]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Adding and installing yum.repos/public-yum-ol7.repo
authorFrank Brehm <frank.brehm@pixelpark.com>
Wed, 2 May 2018 09:27:36 +0000 (11:27 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Wed, 2 May 2018 09:27:36 +0000 (11:27 +0200)
bin/postinst
yum.repos/public-yum-ol7.repo [new file with mode: 0644]

index 0e6b5ec4a72c545ace807c0d9bc41303e47ce321..c1041010c8924e76f17c0ed83d0e89acf69c60b0 100644 (file)
@@ -318,10 +318,20 @@ install_epel() {
 
     local url=
     local tgt=
+    local bname=
+    local repo_file=
 
-    mkdir -pv /etc/yum.repos.d
+    echo
+    echo "Backing up existing repo files -> /etc/yum.repos.d/.old ..."
+    mkdir -pv /etc/yum.repos.d/.old
+    for repo_file in /etc/yum.repos.d/*.repo ; do
+        if [[ ! -f "${repo_file}" ]] ; then
+            continue
+        fi
+        cp -pv "${repo_file}" /etc/yum.repos.d/.old
+    done
 
-    for bname in epel.repo epel-testing.repo puppet.repo rpm-repo.pixelpark.com.repo ; do
+    for bname in public-yum-ol7.repo epel.repo epel-testing.repo puppet.repo rpm-repo.pixelpark.com.repo ; do
         url="${COBBLER_URL}/custom/create-vmware-tpl/yum.repos/${bname}"
         tgt="/etc/yum.repos.d/${bname}"
         echo
@@ -343,11 +353,6 @@ install_epel() {
         chmod -v 0644 "${tgt}"
     done
 
-    #local url="${COBBLER_URL}/custom/epel/7/x86_64/epel-release-7-5.noarch.rpm"
-    #echo "Using URL '${url}' ..."
-
-    #yum install -y "${url}"
-
     echo
     log "Cleaning YUM cache ..."
     yum clean all
diff --git a/yum.repos/public-yum-ol7.repo b/yum.repos/public-yum-ol7.repo
new file mode 100644 (file)
index 0000000..94b0846
--- /dev/null
@@ -0,0 +1,14 @@
+[ol7_latest]
+name=Oracle Linux $releasever Latest ($basearch)
+baseurl=https://repo.pixelpark.com/Linux/yum/OracleLinux/OL7/latest/$basearch/
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
+gpgcheck=1
+enabled=1
+
+[ol7_u0_base]
+name=Oracle Linux $releasever GA installation media copy ($basearch)
+baseurl=https://repo.pixelpark.com/Linux/yum/OracleLinux/OL7/0/base/$basearch/
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
+gpgcheck=1
+enabled=0
+