From 6225ce194306e9afc1fc776cd190e5f47fb7e737 Mon Sep 17 00:00:00 2001 From: Digimer Date: Tue, 23 Nov 2021 23:32:07 -0500 Subject: [PATCH] Updated striker-prep-database to not configure the firewall if firewalld isn't running. Signed-off-by: Digimer --- share/words.xml | 1 + tools/striker-prep-database | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/share/words.xml b/share/words.xml index 4bc526a2..5c4bf03c 100644 --- a/share/words.xml +++ b/share/words.xml @@ -2059,6 +2059,7 @@ The file: [#!variable!file!#] needs to be updated. The difference is: query() was asked to query the database with UUID: [#!variable!old_uuid!#] but there is no file handle open to the database. Switched the read to: [#!variable!new_uuid!#].]]> Opening the firewall zone: [#!variable!zone!#] to allow the service: [#!variable!service!#]. No password for the database on the host with UUID: [#!variable!uuid!#], skipping it. + The firewalld daemon isn't running, skipping firewall setup. The host name: [#!variable!target!#] does not resolve to an IP address. diff --git a/tools/striker-prep-database b/tools/striker-prep-database index f0e9c02a..a2b50b8e 100755 --- a/tools/striker-prep-database +++ b/tools/striker-prep-database @@ -507,6 +507,14 @@ sub configure_firewall output => $output, return_code => $return_code, }}); + + # If the return code was 252, firewalld isn't running. + if ($return_code eq "252") + { + $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, key => "log_0669"}); + return(0); + } + foreach my $line (split/\n/, $output) { if ($line =~ /^\S/)