summaryrefslogtreecommitdiffstats
path: root/func
diff options
context:
space:
mode:
authorJasper Capel <capel@stone-it.com>2009-01-30 16:33:15 +0100
committerJasper Capel <jasper@newnewyork.nl>2009-02-02 11:58:13 +0100
commit57740b32f134bc42bda8a5736987e0a2e57071ea (patch)
tree30595d5f247bce95b62692f104b52334bdb90799 /func
parent28f25faa8a5dd4ae5b0151760d0ce356c7c7d092 (diff)
downloadfunc-57740b32f134bc42bda8a5736987e0a2e57071ea.tar.gz
func-57740b32f134bc42bda8a5736987e0a2e57071ea.tar.xz
func-57740b32f134bc42bda8a5736987e0a2e57071ea.zip
Set bridge forwarding delay to '0', so it will actually work.
Diffstat (limited to 'func')
-rw-r--r--func/minion/modules/bridge.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/func/minion/modules/bridge.py b/func/minion/modules/bridge.py
index 12998f2..772a74f 100644
--- a/func/minion/modules/bridge.py
+++ b/func/minion/modules/bridge.py
@@ -152,6 +152,8 @@ class Bridge(func_module.FuncModule):
brlist = self.list()
if brname not in brlist:
exitcode = os.spawnv(os.P_WAIT, self.brctl, [ self.brctl, "addbr", brname ] )
+ if exitcode == 0:
+ os.spawnv(os.P_WAIT, self.brctl, [ self.brctl, "setfd", brname, "0" ] )
else:
# Bridge already exists, return 0 anyway.
exitcode = 0
@@ -166,7 +168,7 @@ class Bridge(func_module.FuncModule):
if brname not in self.ignorebridges:
filename = "/etc/sysconfig/network-scripts/ifcfg-%s" % brname
fp = open(filename, "w")
- filelines = [ "DEVICE=%s\n" % brname, "TYPE=Bridge\n", "ONBOOT=yes\n" ]
+ filelines = [ "DEVICE=%s\n" % brname, "TYPE=Bridge\n", "ONBOOT=yes\n", "DELAY=0\n" ]
if ipaddr != None:
filelines.append("IPADDR=%s\n" % ipaddr)
if netmask != None: