diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-07-24 22:09:33 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-07-24 22:09:33 +0000 |
commit | bc1746b5b8a0b290f59f4896de65ba2d66118ce7 (patch) | |
tree | 7617c322427a0a45cd1ce04f0145225d48c23c0c | |
parent | bc89f7d37c85b50a277373c8ed824e4869422b50 (diff) | |
download | pfsense-bc1746b5b8a0b290f59f4896de65ba2d66118ce7.zip pfsense-bc1746b5b8a0b290f59f4896de65ba2d66118ce7.tar.gz |
Freebsd uses ifconfig instead of brconfig. The horror!
-rw-r--r-- | etc/inc/interfaces.inc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 4883596..eae6e4f 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -248,8 +248,15 @@ function interfaces_optional_configure_if($opti) { mwexec("/sbin/ifconfig " . escapeshellarg($optcfg['if']) . " delete up"); /* use open/netBSD style bridge */ mwexec("/sbin/ifconfig bridge{$bridges_total} create"); - mwexec("/sbin/brconfig bridge{$bridges_total} add {$optcfg['if']} add {$config['interfaces'][$optcfg['bridge']]['if']} up"); - mwexec("/sbin/brconfig bridge{$bridges_total} stp {$optcfg['if']} add {$config['interfaces'][$optcfg['bridge']]['if']}"); + mwexec("/sbin/ifconfig bridge{$bridges_total} addm {$optcfg['if']} addm {$config['interfaces'][$optcfg['bridge']]['if']} up"); + mwexec("/sbin/ifconfig bridge{$bridges_total} stp {$optcfg['if']} add {$config['interfaces'][$optcfg['bridge']]['if']}"); + + $fd = fopen("{$g['tmp_path']}/bridge_config_{$optcfg['if']}", "w"); + fwrite($fd, "/sbin/ifconfig bridge{$bridges_total} create\n"); + fwrite($fd, "/sbin/ifconfig bridge{$bridges_total} addm {$optcfg['if']} addm {$config['interfaces'][$optcfg['bridge']]['if']} up\n"); + fwrite($fd, "/sbin/ifconfig bridge{$bridges_total} stp {$optcfg['if']} add {$config['interfaces'][$optcfg['bridge']]['if']}\n"); + fclose($fd); + /* lets keep track of the amount of bridges initialized */ $bridges_total++; } else { |