[PATCH] Only fail on a missing firewalld command if the firewall is enabled (#1004976).

Chris Lumens clumens at redhat.com
Mon Sep 23 17:14:52 UTC 2013


If the user gives firewall --disabled and their package set does not include the
firewalld package, we should not raise an error.  The firewall will be disabled
on the target system due to the lack of firewalld.
---
 pyanaconda/kickstart.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 05e855d..3856814 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -525,8 +525,9 @@ class Firewall(commands.firewall.F14_Firewall):
 
         cmd = "/usr/bin/firewall-offline-cmd"
         if not os.path.exists(ROOT_PATH+cmd):
-            msg = _("%s is missing. Cannot setup firewall.") % (cmd,)
-            raise KickstartError(msg)
+            if self.enabled:
+                msg = _("%s is missing. Cannot setup firewall.") % (cmd,)
+                raise KickstartError(msg)
         else:
             iutil.execWithRedirect(cmd, args, root=ROOT_PATH)
 
-- 
1.8.1.2



More information about the anaconda-patches mailing list