Skip to content

Commit

Permalink
Merge pull request #7772 from zadowsmash/fix-rhel-yum-config
Browse files Browse the repository at this point in the history
fixed yum proxy configuration
  • Loading branch information
k8s-ci-robot committed Jan 5, 2020
2 parents e4da659 + 6150ebe commit be1eea3
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/model/bootstrapscript.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ func (b *BootstrapScript) createProxyEnv(ps *kops.EgressProxySpec) string {
buffer.WriteString("*[Uu]buntu*)\n")
buffer.WriteString(` echo "Acquire::http::Proxy \"${http_proxy}\";" > /etc/apt/apt.conf.d/30proxy ;;` + "\n")
buffer.WriteString("*[Rr]ed[Hh]at*)\n")
buffer.WriteString(` echo "http_proxy=${http_proxy}" >> /etc/yum.conf ;;` + "\n")
buffer.WriteString(` echo "proxy=${http_proxy}" >> /etc/yum.conf ;;` + "\n")
buffer.WriteString("esac\n")

// Set env variables for systemd
Expand Down
2 changes: 1 addition & 1 deletion pkg/model/tests/data/bootstrapscript_0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ case `cat /proc/version` in
*[Uu]buntu*)
echo "Acquire::http::Proxy \"${http_proxy}\";" > /etc/apt/apt.conf.d/30proxy ;;
*[Rr]ed[Hh]at*)
echo "http_proxy=${http_proxy}" >> /etc/yum.conf ;;
echo "proxy=${http_proxy}" >> /etc/yum.conf ;;
esac
echo "DefaultEnvironment=\"http_proxy=${http_proxy}\" \"https_proxy=${http_proxy}\" \"NO_PROXY=${no_proxy}\" \"no_proxy=${no_proxy}\"" >> /etc/systemd/system.conf
systemctl daemon-reload
Expand Down
2 changes: 1 addition & 1 deletion pkg/model/tests/data/bootstrapscript_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ case `cat /proc/version` in
*[Uu]buntu*)
echo "Acquire::http::Proxy \"${http_proxy}\";" > /etc/apt/apt.conf.d/30proxy ;;
*[Rr]ed[Hh]at*)
echo "http_proxy=${http_proxy}" >> /etc/yum.conf ;;
echo "proxy=${http_proxy}" >> /etc/yum.conf ;;
esac
echo "DefaultEnvironment=\"http_proxy=${http_proxy}\" \"https_proxy=${http_proxy}\" \"NO_PROXY=${no_proxy}\" \"no_proxy=${no_proxy}\"" >> /etc/systemd/system.conf
systemctl daemon-reload
Expand Down
2 changes: 1 addition & 1 deletion pkg/model/tests/data/bootstrapscript_2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ case `cat /proc/version` in
*[Uu]buntu*)
echo "Acquire::http::Proxy \"${http_proxy}\";" > /etc/apt/apt.conf.d/30proxy ;;
*[Rr]ed[Hh]at*)
echo "http_proxy=${http_proxy}" >> /etc/yum.conf ;;
echo "proxy=${http_proxy}" >> /etc/yum.conf ;;
esac
echo "DefaultEnvironment=\"http_proxy=${http_proxy}\" \"https_proxy=${http_proxy}\" \"NO_PROXY=${no_proxy}\" \"no_proxy=${no_proxy}\"" >> /etc/systemd/system.conf
systemctl daemon-reload
Expand Down
2 changes: 1 addition & 1 deletion pkg/model/tests/data/bootstrapscript_3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ case `cat /proc/version` in
*[Uu]buntu*)
echo "Acquire::http::Proxy \"${http_proxy}\";" > /etc/apt/apt.conf.d/30proxy ;;
*[Rr]ed[Hh]at*)
echo "http_proxy=${http_proxy}" >> /etc/yum.conf ;;
echo "proxy=${http_proxy}" >> /etc/yum.conf ;;
esac
echo "DefaultEnvironment=\"http_proxy=${http_proxy}\" \"https_proxy=${http_proxy}\" \"NO_PROXY=${no_proxy}\" \"no_proxy=${no_proxy}\"" >> /etc/systemd/system.conf
systemctl daemon-reload
Expand Down
2 changes: 1 addition & 1 deletion pkg/model/tests/data/bootstrapscript_4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ case `cat /proc/version` in
*[Uu]buntu*)
echo "Acquire::http::Proxy \"${http_proxy}\";" > /etc/apt/apt.conf.d/30proxy ;;
*[Rr]ed[Hh]at*)
echo "http_proxy=${http_proxy}" >> /etc/yum.conf ;;
echo "proxy=${http_proxy}" >> /etc/yum.conf ;;
esac
echo "DefaultEnvironment=\"http_proxy=${http_proxy}\" \"https_proxy=${http_proxy}\" \"NO_PROXY=${no_proxy}\" \"no_proxy=${no_proxy}\"" >> /etc/systemd/system.conf
systemctl daemon-reload
Expand Down
2 changes: 1 addition & 1 deletion pkg/model/tests/data/bootstrapscript_5.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ case `cat /proc/version` in
*[Uu]buntu*)
echo "Acquire::http::Proxy \"${http_proxy}\";" > /etc/apt/apt.conf.d/30proxy ;;
*[Rr]ed[Hh]at*)
echo "http_proxy=${http_proxy}" >> /etc/yum.conf ;;
echo "proxy=${http_proxy}" >> /etc/yum.conf ;;
esac
echo "DefaultEnvironment=\"http_proxy=${http_proxy}\" \"https_proxy=${http_proxy}\" \"NO_PROXY=${no_proxy}\" \"no_proxy=${no_proxy}\"" >> /etc/systemd/system.conf
systemctl daemon-reload
Expand Down

0 comments on commit be1eea3

Please sign in to comment.