From c74bbc35b8b17a3570262c9385dbd539b3d9415a Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Wed, 2 May 2018 11:27:36 +0200 Subject: [PATCH] Adding and installing yum.repos/public-yum-ol7.repo --- bin/postinst | 19 ++++++++++++------- yum.repos/public-yum-ol7.repo | 14 ++++++++++++++ 2 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 yum.repos/public-yum-ol7.repo diff --git a/bin/postinst b/bin/postinst index 0e6b5ec..c104101 100644 --- a/bin/postinst +++ b/bin/postinst @@ -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 index 0000000..94b0846 --- /dev/null +++ b/yum.repos/public-yum-ol7.repo @@ -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 + -- 2.39.5