mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Fix preflight script on centos
This commit is contained in:
@@ -35,14 +35,21 @@ check_default_repos() {
|
|||||||
echo "" >> "$preflight_log"
|
echo "" >> "$preflight_log"
|
||||||
yum -y check-update >> $preflight_log 2>&1
|
yum -y check-update >> $preflight_log 2>&1
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
|
if [[ $ret_code == 0 || $ret_code == 100 ]]; then
|
||||||
|
printf '%s\n' ' SUCCESS'
|
||||||
|
ret_code=0
|
||||||
|
else
|
||||||
|
printf '%s\n' ' FAILURE'
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
printf '%s' 'apt update.' | tee -a "$preflight_log"
|
printf '%s' 'apt update.' | tee -a "$preflight_log"
|
||||||
echo "" >> "$preflight_log"
|
echo "" >> "$preflight_log"
|
||||||
retry 50 10 "apt-get -y update" >> $preflight_log 2>&1
|
retry 50 10 "apt-get -y update" >> $preflight_log 2>&1
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
|
[[ $ret_code == 0 ]] && printf '%s\n' ' SUCCESS' || printf '%s\n' ' FAILURE'
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ $ret_code == 0 ]] && printf '%s\n' ' SUCCESS' || printf '%s\n' ' FAILURE'
|
|
||||||
return $ret_code
|
return $ret_code
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user