From 1e0cf1b8afe1f7b6e248dd3f511981a7a0acabb1 Mon Sep 17 00:00:00 2001 From: rperper Date: Wed, 14 Nov 2018 13:39:53 -0500 Subject: [PATCH] Bug in firewall rule --- install/firewallUtilities.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install/firewallUtilities.py b/install/firewallUtilities.py index e470d26bc..9aa3e5b27 100644 --- a/install/firewallUtilities.py +++ b/install/firewallUtilities.py @@ -6,6 +6,7 @@ import argparse import os import shlex import socket +import install @@ -14,7 +15,7 @@ class FirewallUtilities: @staticmethod def addRule(proto,port): try: - command = 'sudo firewall-cmd --permanent --zone-public --add-port=' + port + '/' + proto + command = 'sudo firewall-cmd --permanent --zone=public --add-port=' + port + '/' + proto #if port == "21": # command = "sudo firewall-cmd --add-service=ftp --permanent" @@ -40,6 +41,10 @@ class FirewallUtilities: res = subprocess.call(cmd) + if install.preFlightsChecks.resFailed(install.get_distro(), res): + install.preFlightsChecks.stdOut("Failed to install rule: " + command + " Error #" + str(res), 1) + return 0 + except OSError, msg: logging.InstallLog.writeToFile(str(msg) + " [addRule]") return 0