Merge pull request #10300 from Security-Onion-Solutions/dougburks-patch-2

FIX: Improve soup's local file modification logic #8972
This commit is contained in:
Doug Burks
2023-05-08 09:47:57 -04:00
committed by GitHub

View File

@@ -202,7 +202,7 @@ check_local_mods() {
default_file="${DEFAULT_SALT_DIR}${stripped_path}"
if [[ -f $default_file ]]; then
file_diff=$(diff "$default_file" "$local_file" )
if [[ $(echo "$file_diff" | grep -c "^<") -gt 0 ]]; then
if [[ $(echo "$file_diff" | grep -Ec "^[<>]") -gt 0 ]]; then
local_mod_arr+=( "$local_file" )
fi
fi