mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #3804 from Security-Onion-Solutions/saltfix
Fix Repos by forcing removal
This commit is contained in:
@@ -309,7 +309,7 @@ sostatusdir:
|
||||
/usr/sbin/so-status -q && echo $? > /opt/so/log/sostatus/status.log 2>&1:
|
||||
cron.present:
|
||||
- user: root
|
||||
- minute: '*/15'
|
||||
- minute: '*/5'
|
||||
- hour: '*'
|
||||
- daymonth: '*'
|
||||
- month: '*'
|
||||
|
||||
@@ -2285,14 +2285,22 @@ secrets_pillar(){
|
||||
|
||||
securityonion_repo() {
|
||||
# Remove all the current repos
|
||||
if [[ "$OS" == "centos" && $is_airgap ]]; then
|
||||
mkdir -p /root/oldrepos
|
||||
mv /etc/yum.repos.d/* /root/oldrepos/
|
||||
rm -f /etc/yum.repos.d/*
|
||||
if [[ ! $is_manager && "$MANAGERUPDATES" == "1" ]]; then
|
||||
cp -f ../salt/common/yum_repos/securityonioncache.repo /etc/yum.repos.d/
|
||||
if [[ "$OS" == "centos" ]]; then
|
||||
if [[ "$INTERWEBS" == "AIRGAP" ]]; then
|
||||
echo "This is airgap I don't need to add this repo"
|
||||
else
|
||||
cp -f ../salt/common/yum_repos/securityonion.repo /etc/yum.repos.d/
|
||||
mkdir -p /root/oldrepos
|
||||
mv -v /etc/yum.repos.d/* /root/oldrepos/
|
||||
ls -la /etc/yum.repos.d/
|
||||
rm -rf /etc/yum.repos.d
|
||||
yum clean all
|
||||
yum repolist all
|
||||
mkdir -p /etc/yum.repos.d
|
||||
if [[ ! $is_manager && "$MANAGERUPDATES" == "1" ]]; then
|
||||
cp -f ../salt/common/yum_repos/securityonioncache.repo /etc/yum.repos.d/
|
||||
else
|
||||
cp -f ../salt/common/yum_repos/securityonion.repo /etc/yum.repos.d/
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "This is Ubuntu"
|
||||
|
||||
Reference in New Issue
Block a user