ignore failure notification for Ubuntu Failed to restart snapd

This commit is contained in:
m0duspwnens
2023-06-16 13:58:45 -04:00
parent 2334d82d36
commit ed1e2c8908

View File

@@ -32,6 +32,10 @@ log_has_errors() {
# Ignore Failed: 0 since that is the salt state output, and we detect state failures # Ignore Failed: 0 since that is the salt state output, and we detect state failures
# via Result: False already. # via Result: False already.
# This is ignored for Ubuntu
# Failed to restart snapd.mounts-pre.target: Operation refused, unit snapd.mounts-pre.target
# may be requested by dependency only (it is configured to refuse manual start/stop).
grep -E "FAILED|Failed|failed|ERROR|Result: False" "$setup_log" | \ grep -E "FAILED|Failed|failed|ERROR|Result: False" "$setup_log" | \
grep -vE "The Salt Master has cached the public key for this node" | \ grep -vE "The Salt Master has cached the public key for this node" | \
grep -vE "Minion failed to authenticate with the master" | \ grep -vE "Minion failed to authenticate with the master" | \
@@ -46,6 +50,7 @@ log_has_errors() {
grep -vE "code: 100" | \ grep -vE "code: 100" | \
grep -vE "/nsm/rules/sigma*" | \ grep -vE "/nsm/rules/sigma*" | \
grep -vE "/nsm/rules/yara*" | \ grep -vE "/nsm/rules/yara*" | \
grep -vE "Failed to restart snapd" | \
grep -vE "Running scope as unit" &> "$error_log" grep -vE "Running scope as unit" &> "$error_log"
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then