BF: Change name->actname for multi action jails to avoid clash

Primary examples is `name` is used in iptables actions for the chain.
Also changed pop->get so actname can be used as keyword
pull/189/head
Steven Hiscocks 12 years ago
parent bec70cbe4b
commit a3e216b0b2

@ -44,7 +44,7 @@ class ActionReader(DefinitionInitConfigReader):
]
def __init__(self, file_, jailName, initOpts, **kwargs):
self._name = initOpts.pop("name", file_)
self._name = initOpts.get("actname", file_)
DefinitionInitConfigReader.__init__(
self, file_, jailName, initOpts, **kwargs)

@ -312,8 +312,8 @@ class JailsReaderTest(unittest.TestCase):
jailfd = open(os.path.join(basedir, "jail.conf"), 'w')
jailfd.write("""
[testjail1]
action = testaction1[name=test1]
testaction1[name=test2]
action = testaction1[actname=test1]
testaction1[actname=test2]
filter = testfilter1
""")
jailfd.close()

Loading…
Cancel
Save