yum clean all needs to happen before repo files are moved or the clean doesnt clean anything

This commit is contained in:
m0duspwnens
2022-01-19 12:33:58 -05:00
parent 7ebba1f325
commit fbe54b9ee8

View File

@@ -2343,11 +2343,11 @@ securityonion_repo() {
if [[ "$INTERWEBS" == "AIRGAP" ]]; then if [[ "$INTERWEBS" == "AIRGAP" ]]; then
echo "This is airgap I don't need to add this repo" echo "This is airgap I don't need to add this repo"
else else
logCmd "yum clean all"
logCmd "mkdir -vp /root/oldrepos" logCmd "mkdir -vp /root/oldrepos"
logCmd "mv -v /etc/yum.repos.d/* /root/oldrepos/" logCmd "mv -v /etc/yum.repos.d/* /root/oldrepos/"
logCmd "ls -la /etc/yum.repos.d/" logCmd "ls -la /etc/yum.repos.d/"
logCmd "rm -vrf /etc/yum.repos.d" logCmd "rm -vrf /etc/yum.repos.d"
logCmd "yum clean all"
logCmd "yum repolist all" logCmd "yum repolist all"
logCmd "mkdir -vp /etc/yum.repos.d" logCmd "mkdir -vp /etc/yum.repos.d"
if [[ ! $is_manager && "$MANAGERUPDATES" == "1" ]]; then if [[ ! $is_manager && "$MANAGERUPDATES" == "1" ]]; then