]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Changing Repo handling in postinst scripts
authorFrank Brehm <frank@brehm-online.com>
Fri, 25 Oct 2019 08:27:33 +0000 (10:27 +0200)
committerFrank Brehm <frank@brehm-online.com>
Fri, 25 Oct 2019 08:27:33 +0000 (10:27 +0200)
bin/postinst
bin/postinst.chrony

index 8f7bf4bf19cb904b638703bbfd2f6a7e666a5114..7d324cec244bf5716bda903b6f4a5facd6dfba48 100644 (file)
@@ -346,12 +346,14 @@ install_epel() {
         if [[ ! -f "${repo_file}" ]] ; then
             continue
         fi
-        cp -pv "${repo_file}" /etc/yum.repos.d/.old
+        mv -v "${repo_file}" /etc/yum.repos.d/.old
     done
 
-    local repo_files="epel.repo epel-testing.repo puppet.repo rpm-repo.pixelpark.com.repo"
+    local repo_files="epel.repo epel-testing.repo puppet.repo pixelpark.repo"
     if [[ -f "/etc/oracle-release" ]] ; then
-        repo_files="public-yum-ol7.repo ${repo_files}"
+        repo_files="ol7_addons.repo ol7_latest.repo ol7_optional_latest.repo ${repo_files}"
+    elif [[ -f /etc/centos-release ]] ; then
+        repo_files="centos-base.repo ${repo_files}"
     fi
 
     for bname in ${repo_files} ; do
@@ -371,7 +373,10 @@ install_epel() {
     chmod -v 0755 "/etc/pki"
     chmod -v 0755 "/etc/pki/rpm-gpg"
 
-    for bname in RPM-GPG-KEY-EPEL-7 RPM-GPG-KEY-pixelpark RPM-GPG-KEY-puppet-release ; do
+    local key_files="RPM-GPG-KEY-CentOS-SIG-Storage RPM-GPG-KEY-EPEL-7 RPM-GPG-KEY-oracle"
+    key_files+=" RPM-GPG-KEY-pixelpark RPM-GPG-KEY-puppet-release"
+
+    for bname in ${key_files} ; do
         url="${COBBLER_URL}/custom/create-vmware-tpl/yum.repos/${bname}"
         tgt="/etc/pki/rpm-gpg/${bname}"
         echo
index 6b9d60654757215efee3ebbb0f55a8c42ce680be..9ed49f4ace1b8b179b990c524a4c590a0aab2f26 100644 (file)
@@ -332,10 +332,17 @@ install_epel() {
         if [[ ! -f "${repo_file}" ]] ; then
             continue
         fi
-        cp -pv "${repo_file}" /etc/yum.repos.d/.old
+        mv -v "${repo_file}" /etc/yum.repos.d/.old
     done
 
-    for bname in public-yum-ol7.repo epel.repo epel-testing.repo puppet.repo rpm-repo.pixelpark.com.repo ; do
+    local repo_files="epel.repo epel-testing.repo puppet.repo pixelpark.repo"
+    if [[ -f "/etc/oracle-release" ]] ; then
+        repo_files="ol7_addons.repo ol7_latest.repo ol7_optional_latest.repo ${repo_files}"
+    elif [[ -f /etc/centos-release ]] ; then
+        repo_files="centos-base.repo ${repo_files}"
+    fi
+
+    for bname in ${repo_files} ; do
         url="${COBBLER_URL}/custom/create-vmware-tpl/yum.repos/${bname}"
         tgt="/etc/yum.repos.d/${bname}"
         echo
@@ -352,7 +359,10 @@ install_epel() {
     chmod -v 0755 "/etc/pki"
     chmod -v 0755 "/etc/pki/rpm-gpg"
 
-    for bname in RPM-GPG-KEY-EPEL-7 RPM-GPG-KEY-pixelpark RPM-GPG-KEY-puppet-release ; do
+    local key_files="RPM-GPG-KEY-CentOS-SIG-Storage RPM-GPG-KEY-EPEL-7 RPM-GPG-KEY-oracle"
+    key_files+=" RPM-GPG-KEY-pixelpark RPM-GPG-KEY-puppet-release"
+
+    for bname in ${key_files} ; do
         url="${COBBLER_URL}/custom/create-vmware-tpl/yum.repos/${bname}"
         tgt="/etc/pki/rpm-gpg/${bname}"
         echo