mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Strip trailing newlines from version and hotfix files
This commit is contained in:
@@ -715,9 +715,9 @@ update_version() {
|
||||
|
||||
upgrade_check() {
|
||||
# Let's make sure we actually need to update.
|
||||
NEWVERSION=$(cat $UPDATE_DIR/VERSION)
|
||||
HOTFIXVERSION=$(cat $UPDATE_DIR/HOTFIX)
|
||||
[[ -f /etc/sohotfix ]] && CURRENTHOTFIX=$(cat /etc/sohotfix)
|
||||
NEWVERSION=$(cat $UPDATE_DIR/VERSION | tr -d '\n')
|
||||
HOTFIXVERSION=$(cat $UPDATE_DIR/HOTFIX | tr -d '\n')
|
||||
[[ -f /etc/sohotfix ]] && CURRENTHOTFIX=$(cat /etc/sohotfix | tr -d '\n')
|
||||
if [ "$INSTALLEDVERSION" == "$NEWVERSION" ]; then
|
||||
echo "Checking to see if there are hotfixes needed"
|
||||
if [ "$HOTFIXVERSION" == "$CURRENTHOTFIX" ]; then
|
||||
@@ -838,7 +838,7 @@ verify_latest_update_script() {
|
||||
}
|
||||
|
||||
apply_hotfix() {
|
||||
if [[ "$INSTALLEDVERSION" == "2.3.90" && "$HOTFIXVERSION" =~ "WAZUH" ]]; then
|
||||
if [[ "$INSTALLEDVERSION" == "2.3.90" && "$HOTFIXVERSION" == "WAZUH" ]] ; then
|
||||
FILE="/nsm/wazuh/etc/ossec.conf"
|
||||
echo "Detecting if ossec.conf needs corrected..."
|
||||
WAZUHHEADER=$(head -1 $FILE | grep "xml version")
|
||||
|
||||
Reference in New Issue
Block a user