cleanup after
This commit is contained in:
parent
d06a66d0f0
commit
b2d4d75686
@ -135,6 +135,7 @@ if [ -n "$WHITELIST" ]; then
|
|||||||
# [1] https://bugzilla.redhat.com/show_bug.cgi?id=965567
|
# [1] https://bugzilla.redhat.com/show_bug.cgi?id=965567
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
if [[ -n ${DIB_YUM_DNF_CONTENTDIR:-''} ]]; then
|
if [[ -n ${DIB_YUM_DNF_CONTENTDIR:-''} ]]; then
|
||||||
|
sudo cp /etc/dnf/vars/contentdir /etc/dnf/vars/contentdir.bak
|
||||||
echo $DIB_YUM_DNF_CONTENTDIR | sudo tee /etc/dnf/vars/contentdir
|
echo $DIB_YUM_DNF_CONTENTDIR | sudo tee /etc/dnf/vars/contentdir
|
||||||
sudo sed -i -e 's,^mirrorlist,#mirrorlist,' -e 's,^#baseurl,baseurl,' /etc/yum.repos.d/*.repo
|
sudo sed -i -e 's,^mirrorlist,#mirrorlist,' -e 's,^#baseurl,baseurl,' /etc/yum.repos.d/*.repo
|
||||||
fi
|
fi
|
||||||
|
@ -6,6 +6,11 @@ fi
|
|||||||
set -eu
|
set -eu
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
|
if [[ -n ${DIB_YUM_DNF_CONTENTDIR:-''} ]]; then
|
||||||
|
sudo mv /etc/dnf/vars/contentdir.bak /etc/dnf/vars/contentdir
|
||||||
|
sudo sed -i -e 's,^#mirrorlist,mirrorlist,' -e 's,^baseurl,#baseurl,' /etc/yum.repos.d/*.repo
|
||||||
|
fi
|
||||||
|
|
||||||
# exit directly if DIB_YUM_REPO_CONF is not defined properly
|
# exit directly if DIB_YUM_REPO_CONF is not defined properly
|
||||||
if [ -z "${DIB_YUM_REPO_CONF:-}" ] ; then
|
if [ -z "${DIB_YUM_REPO_CONF:-}" ] ; then
|
||||||
echo "DIB_YUM_REPO_CONF is not set - no repo configurations will be cleaned up"
|
echo "DIB_YUM_REPO_CONF is not set - no repo configurations will be cleaned up"
|
||||||
|
Loading…
Reference in New Issue
Block a user