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
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
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
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