OSDN Git Service

Bridge driver's building in
[fulcon/Fulcon.git] / src / subcmd / br-info
index 03f7338..d163aaf 100755 (executable)
@@ -1,5 +1,8 @@
 #!/bin/bash
 
+FULCONDRIVER=`fulcon driver-name`
+BRIDGEDRIVER=`fulcon bridge-name`
+PATH=/usr/lib/fulcon/driver/$BRIDGEDRIVER:/usr/lib/fulcon/driver/$FULCONDRIVER:/usr/lib/fulcon/lib:$PATH
 
 # Copyright (C) 2015 NIWA Hideyuki
 
@@ -18,17 +21,17 @@ if [ $# -eq 1 -a x"$1" != x"br-info" ]; then
        exit -1
 fi
 
-for i in `brctl show | egrep fulcon | awk '{print $1}' `
+for i in `br-show | egrep fulcon | awk '{print $1}' `
 do
-       N=`brctl show $i | awk '($1=="'$i'"){print NF}'`
+       N=`br-show $i | awk '($1=="'$i'"){print NF}'`
        if [ $N -eq 4 ]; then
                ip a show $i
                echo
-               brctl show $i
+               br-show $i
                echo
        else
                ip link set $i down
-               brctl delbr $i
+               br-delbr $i
        fi
 done