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

Radek Vykydal rvykydal at redhat.com
Mon Jul 14 11:15:47 UTC 2014


From: Chris Lumens <clumens at redhat.com>

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.

Resolves: rhbz#1113535
Port of rpmostreepayload patches from master
commit a1f1d2248ca8e1b6c4e0437aeff9f7cc165e785e
---
 pyanaconda/kickstart.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 92a406a..cb3de8b 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -582,8 +582,9 @@ class Firewall(commands.firewall.F20_Firewall):
 
         cmd = "/usr/bin/firewall-offline-cmd"
         if not os.path.exists(iutil.getSysroot()+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.execInSysroot(cmd, args)
 
-- 
1.9.0



More information about the anaconda-patches mailing list