summaryrefslogtreecommitdiffstats
path: root/firewall.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-08-14 02:00:12 +0000
committerJeremy Katz <katzj@redhat.com>2003-08-14 02:00:12 +0000
commitc540e134193f9759873ced09b0156c6219983101 (patch)
treeb36013fe219e6c3d8762bf2a0a32b538ac5c0373 /firewall.py
parent3f01dfc8e9d6b8bf25b79b1cbda94ca0ff4ada09 (diff)
downloadanaconda-c540e134193f9759873ced09b0156c6219983101.tar.gz
anaconda-c540e134193f9759873ced09b0156c6219983101.tar.xz
anaconda-c540e134193f9759873ced09b0156c6219983101.zip
merge from taroon-branch. all kinds of miscellaneous bugfixes, including
* firewall update * iSeries PReP size * ppc mediacheck * tzdata stuff * cmdline mode * pkg defaults screen
Diffstat (limited to 'firewall.py')
-rw-r--r--firewall.py25
1 files changed, 11 insertions, 14 deletions
diff --git a/firewall.py b/firewall.py
index 8fcb00fa5..ef5217089 100644
--- a/firewall.py
+++ b/firewall.py
@@ -22,7 +22,7 @@ from rhpl.log import log
class Firewall:
def __init__ (self):
- self.enabled = -1
+ self.enabled = 1
self.ssh = 0
self.telnet = 0
self.smtp = 0
@@ -30,15 +30,12 @@ class Firewall:
self.ftp = 0
self.portlist = ""
self.ports = []
- self.policy = 1
- self.dhcp = 0
self.trustdevs = []
- self.custom = 1
def writeKS(self, f):
f.write("firewall")
- if self.enabled > 0:
+ if self.enabled:
for arg in self.getArgList():
f.write(" " + arg)
else:
@@ -49,12 +46,12 @@ class Firewall:
def getArgList(self):
args = []
- if self.policy:
- args.append ("--medium")
- else:
- args.append ("--high")
- if self.dhcp:
- args.append ("--dhcp")
+ if self.enabled:
+ args.append ("--enabled")
+ else:
+ args.append("--disabled")
+ return args
+
if self.portlist:
ports = string.split(self.portlist,',')
for port in ports:
@@ -85,7 +82,7 @@ class Firewall:
def write (self, instPath):
args = [ "/usr/sbin/lokkit", "--quiet", "--nostart" ]
- if self.enabled > 0:
+ if self.enabled:
args = args + self.getArgList()
try:
@@ -107,8 +104,8 @@ class Firewall:
f.close()
else:
- # remove /etc/sysconfig/ipchains
- file = instPath + "/etc/sysconfig/ipchains"
+ # remove /etc/sysconfig/iptables
+ file = instPath + "/etc/sysconfig/iptables"
if os.access(file, os.O_RDONLY):
os.remove(file)