avij / rpms / anaconda

Forked from rpms/anaconda 5 years ago
Clone

Blame SOURCES/0015-Only-fail-on-a-missing-firewalld-command-if-the-fire.patch

fbcaed
From 03f73112ec29c6c1e5c898c38b57dae76992bbf9 Mon Sep 17 00:00:00 2001
fbcaed
From: Chris Lumens <clumens@redhat.com>
fbcaed
Date: Mon, 23 Sep 2013 13:13:11 -0400
fbcaed
Subject: [PATCH 15/20] Only fail on a missing firewalld command if the
fbcaed
 firewall is enabled.
fbcaed
fbcaed
If the user gives firewall --disabled and their package set does not include the
fbcaed
firewalld package, we should not raise an error.  The firewall will be disabled
fbcaed
on the target system due to the lack of firewalld.
fbcaed
fbcaed
Resolves: rhbz#1113535
fbcaed
Port of rpmostreepayload patches from master
fbcaed
commit a1f1d2248ca8e1b6c4e0437aeff9f7cc165e785e
fbcaed
---
fbcaed
 pyanaconda/kickstart.py | 5 +++--
fbcaed
 1 file changed, 3 insertions(+), 2 deletions(-)
fbcaed
fbcaed
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
fbcaed
index 92a406a..cb3de8b 100644
fbcaed
--- a/pyanaconda/kickstart.py
fbcaed
+++ b/pyanaconda/kickstart.py
fbcaed
@@ -582,8 +582,9 @@ class Firewall(commands.firewall.F20_Firewall):
fbcaed
 
fbcaed
         cmd = "/usr/bin/firewall-offline-cmd"
fbcaed
         if not os.path.exists(iutil.getSysroot()+cmd):
fbcaed
-            msg = _("%s is missing. Cannot setup firewall.") % (cmd,)
fbcaed
-            raise KickstartError(msg)
fbcaed
+            if self.enabled:
fbcaed
+                msg = _("%s is missing. Cannot setup firewall.") % (cmd,)
fbcaed
+                raise KickstartError(msg)
fbcaed
         else:
fbcaed
             iutil.execInSysroot(cmd, args)
fbcaed
 
fbcaed
-- 
fbcaed
1.9.3
fbcaed