[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] Don't write out firewall settings if they already exist (#502479)



(Side commentary: this sort of thing is getting a little bit out of hand, we 
should probably think a little on if there's a better way for us to handle 
this sort of thing)

livecds could already have custom firewall settings, so let's not
overwrite them for now
---
 firewall.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/firewall.py b/firewall.py
index bc45cb5..1f08ef8 100644
--- a/firewall.py
+++ b/firewall.py
@@ -73,7 +73,7 @@ class Firewall:
 	args = [ "--quiet", "--nostart", "-f" ] + self.getArgList()
 
         try:
-            if not flags.test:
+            if not flags.test and not os.path.exists("%s/etc/sysconfig/iptables" %(instPath,)):
                 iutil.execWithRedirect("/usr/sbin/lokkit", args,
                                        root=instPath, stdout="/dev/null",
                                        stderr="/dev/null")
-- 
1.6.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]