mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-14 13:12:49 +01:00
sync local repo in soup
This commit is contained in:
@@ -303,6 +303,7 @@ check_log_size_limit() {
|
||||
|
||||
check_os_updates() {
|
||||
# Check to see if there are OS updates
|
||||
echo "Checking for OS updates."
|
||||
NEEDUPDATES="We have detected missing operating system (OS) updates. Do you want to install these OS updates now? This could take a while depending on the size of your grid and how many packages are missing, but it is recommended to keep your system updated."
|
||||
OSUPDATES=$(dnf -q list updates | grep -v docker | grep -v containerd | grep -v salt | grep -v Available | wc -l)
|
||||
if [[ "$OSUPDATES" -gt 0 ]]; then
|
||||
@@ -437,6 +438,11 @@ post_to_2.4.20() {
|
||||
POSTVERSION=2.4.20
|
||||
}
|
||||
|
||||
repo_sync() {
|
||||
echo "Sync the local repo."
|
||||
su socore -c '/usr/sbin/so-repo-sync'
|
||||
}
|
||||
|
||||
stop_salt_master() {
|
||||
# kill all salt jobs across the grid because the hang indefinitely if they are queued and salt-master restarts
|
||||
set +e
|
||||
@@ -762,9 +768,7 @@ main() {
|
||||
fi
|
||||
echo "Verifying we have the latest soup script."
|
||||
verify_latest_update_script
|
||||
echo "Checking for OS updates."
|
||||
check_os_updates
|
||||
|
||||
|
||||
echo "Let's see if we need to update Security Onion."
|
||||
upgrade_check
|
||||
upgrade_space
|
||||
@@ -776,6 +780,10 @@ main() {
|
||||
if [[ $is_airgap -eq 0 ]]; then
|
||||
yum clean all
|
||||
check_os_updates
|
||||
elif [[ $OS == 'oracle' || $OS == 'redhat'|| $OS == 'centos' ]]; then
|
||||
# sync remote repo down to local if not airgap
|
||||
repo_sync
|
||||
check_os_updates
|
||||
fi
|
||||
|
||||
if [ "$is_hotfix" == "true" ]; then
|
||||
|
||||
Reference in New Issue
Block a user