2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-11-19 08:52:20 +00:00

Merge pull request #380 from Obihoernchen/fix/confignet-firewalld-quiet

Do not print the firewalld check of confignet
This commit is contained in:
Jarrod Johnson
2026-11-11 07:09:09 -05:00
committed by GitHub
2 changed files with 6 additions and 2 deletions
@@ -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'])
@@ -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'])