summaryrefslogtreecommitdiffstats
path: root/firewall.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2004-03-30 23:28:00 +0000
committerJeremy Katz <katzj@redhat.com>2004-03-30 23:28:00 +0000
commitf450af19808f21998fbb3267d8f2a15c1b7504cb (patch)
tree1d17c3594f212eb015996111ebaf81405d8140a7 /firewall.py
parent9ef4b396e3fcdfb31f9ce9b73cacca6a4fb78b91 (diff)
downloadanaconda-f450af19808f21998fbb3267d8f2a15c1b7504cb.tar.gz
anaconda-f450af19808f21998fbb3267d8f2a15c1b7504cb.tar.xz
anaconda-f450af19808f21998fbb3267d8f2a15c1b7504cb.zip
always run lokkit, it does the right thing with --disabled
Diffstat (limited to 'firewall.py')
-rw-r--r--firewall.py41
1 files changed, 17 insertions, 24 deletions
diff --git a/firewall.py b/firewall.py
index 1c151342c..ae2fbcad5 100644
--- a/firewall.py
+++ b/firewall.py
@@ -85,30 +85,23 @@ class Firewall:
def write (self, instPath):
args = [ "/usr/sbin/lokkit", "--quiet", "--nostart", "-f" ]
- if self.enabled:
- args = args + self.getArgList()
- try:
- if flags.setupFilesystems:
- iutil.execWithRedirect(args[0], args, root = instPath,
- stdout = None, stderr = None)
- else:
- log("would have run %s", args)
- except RuntimeError, msg:
- log ("lokkit run failed: %s", msg)
- except OSError, (errno, msg):
- log ("lokkit run failed: %s", msg)
+ args = args + self.getArgList()
+
+ try:
+ if flags.setupFilesystems:
+ iutil.execWithRedirect(args[0], args, root = instPath,
+ stdout = None, stderr = None)
else:
- f = open(instPath +
- '/etc/sysconfig/system-config-securitylevel', 'w')
- f.write("# system-config-securitylevel config written out by anaconda\n\n")
- for arg in args[3:]:
- f.write("%s\n" %(arg,))
- f.close()
-
+ log("would have run %s", args)
+ except RuntimeError, msg:
+ log ("lokkit run failed: %s", msg)
+ except OSError, (errno, msg):
+ log ("lokkit run failed: %s", msg)
else:
- # remove /etc/sysconfig/iptables
- file = instPath + "/etc/sysconfig/iptables"
- if os.access(file, os.O_RDONLY):
- os.remove(file)
-
+ f = open(instPath +
+ '/etc/sysconfig/system-config-securitylevel', 'w')
+ f.write("# system-config-securitylevel config written out by anaconda\n\n")
+ for arg in args[3:]:
+ f.write("%s\n" %(arg,))
+ f.close()