diff --git a/confluent_osdeploy/common/profile/scripts/confignet b/confluent_osdeploy/common/profile/scripts/confignet index c6b51216..0ca8f222 100644 --- a/confluent_osdeploy/common/profile/scripts/confignet +++ b/confluent_osdeploy/common/profile/scripts/confignet @@ -608,7 +608,9 @@ if __name__ == '__main__': checktarg = None if '-c' in sys.argv: checktarg = sys.argv[sys.argv.index('-c') + 1] - havefirewall = subprocess.call(['systemctl', 'status', 'firewalld']) + # quiet: images without firewalld print an error otherwise + with open(os.devnull, 'w') as devnull: + havefirewall = subprocess.call(['systemctl', 'status', 'firewalld'], stdout=devnull, stderr=devnull) havefirewall = havefirewall == 0 if havefirewall: subprocess.check_call(['systemctl', 'stop', 'firewalld']) diff --git a/confluent_osdeploy/debian/profiles/default/scripts/confignet b/confluent_osdeploy/debian/profiles/default/scripts/confignet index 25591b08..02b9c1ec 100644 --- a/confluent_osdeploy/debian/profiles/default/scripts/confignet +++ b/confluent_osdeploy/debian/profiles/default/scripts/confignet @@ -489,7 +489,9 @@ class NetworkManager(object): if __name__ == '__main__': - havefirewall = subprocess.call(['systemctl', 'status', 'firewalld']) + # quiet: images without firewalld print an error otherwise + with open(os.devnull, 'w') as devnull: + havefirewall = subprocess.call(['systemctl', 'status', 'firewalld'], stdout=devnull, stderr=devnull) havefirewall = havefirewall == 0 if havefirewall: subprocess.check_call(['systemctl', 'stop', 'firewalld'])