sed and grep need input files

This commit is contained in:
William Wernert
2021-04-21 16:29:24 -04:00
parent c1ae7ff3b6
commit 261e7f7fd9

View File

@@ -2685,8 +2685,8 @@ set_updates() {
if [ "$MANAGERUPDATES" = '1' ]; then
if [ "$OS" = 'centos' ]; then
if [[ ! $is_airgap ]] && ! ( grep -q "$MSRV" /etc/yum.conf); then
if grep -q "proxy="; then
sed -i "s/proxy=.*/proxy=http:\/\/$MSRV:3142/"
if grep -q "proxy=" /etc/yum.conf; then
sed -i "s/proxy=.*/proxy=http:\/\/$MSRV:3142/" /etc/yum.conf
else
echo "proxy=http://$MSRV:3142" >> /etc/yum.conf
fi