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:
|
/usr/sbin/so-status -q && echo $? > /opt/so/log/sostatus/status.log 2>&1:
|
||||||
cron.present:
|
cron.present:
|
||||||
- user: root
|
- user: root
|
||||||
- minute: '*/15'
|
- minute: '*/5'
|
||||||
- hour: '*'
|
- hour: '*'
|
||||||
- daymonth: '*'
|
- daymonth: '*'
|
||||||
- month: '*'
|
- month: '*'
|
||||||
|
|||||||
@@ -2285,14 +2285,22 @@ secrets_pillar(){
|
|||||||
|
|
||||||
securityonion_repo() {
|
securityonion_repo() {
|
||||||
# Remove all the current repos
|
# Remove all the current repos
|
||||||
if [[ "$OS" == "centos" && $is_airgap ]]; then
|
if [[ "$OS" == "centos" ]]; then
|
||||||
mkdir -p /root/oldrepos
|
if [[ "$INTERWEBS" == "AIRGAP" ]]; then
|
||||||
mv /etc/yum.repos.d/* /root/oldrepos/
|
echo "This is airgap I don't need to add this repo"
|
||||||
rm -f /etc/yum.repos.d/*
|
|
||||||
if [[ ! $is_manager && "$MANAGERUPDATES" == "1" ]]; then
|
|
||||||
cp -f ../salt/common/yum_repos/securityonioncache.repo /etc/yum.repos.d/
|
|
||||||
else
|
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
|
fi
|
||||||
else
|
else
|
||||||
echo "This is Ubuntu"
|
echo "This is Ubuntu"
|
||||||
|
|||||||
Reference in New Issue
Block a user