summaryrefslogtreecommitdiffstats
path: root/kickstart.py
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2001-01-10 05:05:35 +0000
committerBill Nottingham <notting@redhat.com>2001-01-10 05:05:35 +0000
commit55f0885a1f3ac6b6610e0563e0d53b1b6afd6cce (patch)
tree512d1bd551fb8415f007155dac7a2a432dfa2218 /kickstart.py
parentf5c9f070a376d5df5de72f7807a038b74ce190ab (diff)
downloadanaconda-55f0885a1f3ac6b6610e0563e0d53b1b6afd6cce.tar.gz
anaconda-55f0885a1f3ac6b6610e0563e0d53b1b6afd6cce.tar.xz
anaconda-55f0885a1f3ac6b6610e0563e0d53b1b6afd6cce.zip
kickstart support for firewall configuration
Diffstat (limited to 'kickstart.py')
-rw-r--r--kickstart.py47
1 files changed, 46 insertions, 1 deletions
diff --git a/kickstart.py b/kickstart.py
index 60f4fea9f..8063593f0 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -60,7 +60,51 @@ class KickstartBase(BaseInstallClass):
BaseInstallClass.doRootPw(self, extra[0], isCrypted = isCrypted)
self.addToSkipList("accounts")
-
+
+ def doFirewall(self, args):
+ (args, extra) = isys.getopt(args, '',
+ [ 'dhcp', 'ssh', 'telnet', 'smtp', 'http', 'ftp',
+ 'port=', 'policy=', 'trust=' ])
+
+ dhcp = 0
+ ssh = 0
+ telnet = 0
+ smtp = 0
+ http = 0
+ ftp = 0
+ policy = 0
+ enable = 1
+ trusts = []
+ ports = None
+
+ for n in args:
+ (str, arg) = n
+ if str == '--dhcp':
+ dhcp = 1
+ elif str == '--ssh':
+ ssh = 1
+ elif str == '--telnet':
+ telnet = 1
+ elif str == '--smtp':
+ smtp = 1
+ elif str == '--http':
+ http = 1
+ elif str == '--ftp':
+ ftp = 1
+ elif str == '--policy':
+ policy = arg
+ elif str == '--trust':
+ trusts.append(arg)
+ elif str == '--port':
+ if ports:
+ ports = '%s %s' % (ports, arg)
+ else:
+ ports = arg
+
+ self.setFirewall(enable, policy, trusts, ports, dhcp, ssh, telnet,
+ smtp, http, ftp)
+ self.addToSkipList("firewall")
+
def doAuthconfig(self, args):
(args, extra) = isys.getopt(args, '',
[ 'useshadow',
@@ -353,6 +397,7 @@ class KickstartBase(BaseInstallClass):
"device" : None ,
"deviceprobe" : None ,
"driverdisk" : None ,
+ "firewall" : self.doFirewall ,
"harddrive" : None ,
"install" : self.doInstall ,
"keyboard" : self.doKeyboard ,