diff --git a/pkg/scripts/os_amzn.go b/pkg/scripts/os_amzn.go index e193f7440..6e692f760 100644 --- a/pkg/scripts/os_amzn.go +++ b/pkg/scripts/os_amzn.go @@ -44,15 +44,6 @@ echo -n "${yum_proxy}" >> /tmp/yum.conf sudo mv /tmp/yum.conf /etc/yum.conf {{ if .CONFIGURE_REPOSITORIES }} -# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned -# repositories, otherwise, yum will fail to upgrade the packages because it's trying to -# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1). -repo_migration_needed=false - -if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then - repo_migration_needed=true -fi - cat <> /tmp/yum.conf sudo mv /tmp/yum.conf /etc/yum.conf {{ if .CONFIGURE_REPOSITORIES }} -# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned -# repositories, otherwise, yum will fail to upgrade the packages because it's trying to -# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1). -repo_migration_needed=false - -if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then - repo_migration_needed=true -fi - cat <> /tmp/yum.conf sudo mv /tmp/yum.conf /etc/yum.conf -# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned -# repositories, otherwise, yum will fail to upgrade the packages because it's trying to -# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1). -repo_migration_needed=false - -if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then - repo_migration_needed=true -fi - cat <> /tmp/yum.conf sudo mv /tmp/yum.conf /etc/yum.conf -# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned -# repositories, otherwise, yum will fail to upgrade the packages because it's trying to -# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1). -repo_migration_needed=false - -if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then - repo_migration_needed=true -fi - cat <> /tmp/yum.conf sudo mv /tmp/yum.conf /etc/yum.conf -# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned -# repositories, otherwise, yum will fail to upgrade the packages because it's trying to -# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1). -repo_migration_needed=false - -if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then - repo_migration_needed=true -fi - cat <> /tmp/yum.conf sudo mv /tmp/yum.conf /etc/yum.conf -# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned -# repositories, otherwise, yum will fail to upgrade the packages because it's trying to -# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1). -repo_migration_needed=false - -if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then - repo_migration_needed=true -fi - cat <> /tmp/yum.conf sudo mv /tmp/yum.conf /etc/yum.conf -# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned -# repositories, otherwise, yum will fail to upgrade the packages because it's trying to -# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1). -repo_migration_needed=false - -if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then - repo_migration_needed=true -fi - cat <> /tmp/yum.conf sudo mv /tmp/yum.conf /etc/yum.conf -# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned -# repositories, otherwise, yum will fail to upgrade the packages because it's trying to -# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1). -repo_migration_needed=false - -if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then - repo_migration_needed=true -fi - cat <> /tmp/yum.conf sudo mv /tmp/yum.conf /etc/yum.conf -# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned -# repositories, otherwise, yum will fail to upgrade the packages because it's trying to -# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1). -repo_migration_needed=false - -if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then - repo_migration_needed=true -fi - cat <> /tmp/yum.conf sudo mv /tmp/yum.conf /etc/yum.conf -# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned -# repositories, otherwise, yum will fail to upgrade the packages because it's trying to -# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1). -repo_migration_needed=false - -if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then - repo_migration_needed=true -fi - cat <> /tmp/yum.conf sudo mv /tmp/yum.conf /etc/yum.conf -# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned -# repositories, otherwise, yum will fail to upgrade the packages because it's trying to -# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1). -repo_migration_needed=false - -if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then - repo_migration_needed=true -fi - cat <> /tmp/yum.conf sudo mv /tmp/yum.conf /etc/yum.conf -# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned -# repositories, otherwise, yum will fail to upgrade the packages because it's trying to -# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1). -repo_migration_needed=false - -if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then - repo_migration_needed=true -fi - cat <> /tmp/yum.conf sudo mv /tmp/yum.conf /etc/yum.conf -# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned -# repositories, otherwise, yum will fail to upgrade the packages because it's trying to -# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1). -repo_migration_needed=false - -if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then - repo_migration_needed=true -fi - cat <> /tmp/yum.conf sudo mv /tmp/yum.conf /etc/yum.conf -# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned -# repositories, otherwise, yum will fail to upgrade the packages because it's trying to -# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1). -repo_migration_needed=false - -if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then - repo_migration_needed=true -fi - cat <> /tmp/yum.conf sudo mv /tmp/yum.conf /etc/yum.conf -# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned -# repositories, otherwise, yum will fail to upgrade the packages because it's trying to -# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1). -repo_migration_needed=false - -if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then - repo_migration_needed=true -fi - cat <> /tmp/yum.conf sudo mv /tmp/yum.conf /etc/yum.conf -# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned -# repositories, otherwise, yum will fail to upgrade the packages because it's trying to -# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1). -repo_migration_needed=false - -if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then - repo_migration_needed=true -fi - cat <> /tmp/yum.conf sudo mv /tmp/yum.conf /etc/yum.conf -# Rebuilding the yum cache is required upon migrating from the legacy to the community-owned -# repositories, otherwise, yum will fail to upgrade the packages because it's trying to -# use old revisions (e.g. 1.27.0-0 instead of 1.27.5-150500.1.1). -repo_migration_needed=false - -if sudo grep -q "packages.cloud.google.com" /etc/yum.repos.d/kubernetes.repo; then - repo_migration_needed=true -fi - cat <