summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-06-02 20:36:33 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-06-02 20:36:33 +0000
commit335978db776a55b5a2d178da15b9ba06c6f5fb65 (patch)
treecdbc5d02055feae2867a2150fc356a87cca26808 /etc
parentdc22c75cedda7f4cc707aef1d51e792c358f5455 (diff)
downloadpfsense-335978db776a55b5a2d178da15b9ba06c6f5fb65.zip
pfsense-335978db776a55b5a2d178da15b9ba06c6f5fb65.tar.gz
Add find_number_of_created_bridges() routine which returns the number of currently created bridges
*/
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 6641905..657ec25 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -418,6 +418,13 @@ function find_carp_interface($ip) {
}
/*
+ * find_number_of_created_bridges(): returns the number of currently created bridges
+ */
+function find_number_of_created_bridges() {
+ return `/sbin/ifconfig | grep \"bridge[0-999]\:" | wc -l`;
+}
+
+/*
* add_rule_to_anchor($anchor, $rule): adds the specified rule to an anchor
*/
function add_rule_to_anchor($anchor, $rule, $label) {
OpenPOWER on IntegriCloud