From ac5a252fc4fa17de06d74e1c643b267489457728 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen.hemminger@vyatta.com>
Date: Mon, 26 Jan 2009 17:16:58 -0800
Subject: bridge: handle non ethernet devices in bridge

Eventually, need to be able to devices named something other
than 'ethX' into bridge. So use sysfs to find devices.
---
 templates/interfaces/bridge/node.def | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'templates/interfaces/bridge/node.def')

diff --git a/templates/interfaces/bridge/node.def b/templates/interfaces/bridge/node.def
index 641d369d..cbf5e9cc 100644
--- a/templates/interfaces/bridge/node.def
+++ b/templates/interfaces/bridge/node.def
@@ -6,7 +6,7 @@ syntax:expression: pattern $VAR(@) "^br[0-9]+$" ; "Must be (br0 - br999)"
 
 create: sudo brctl addbr $VAR(@)
 
-delete: if [ -n "`/usr/sbin/brctl show | grep $VAR(@) | grep eth`" ]; then
+delete: if [ -z `ls /sys/class/net/$VAR(@)/brif` ]; then
 	   echo "Interfaces are still assigned to bridge $VAR(@)";
            exit 1;           
         fi;
-- 
cgit v1.2.3

