git://git.onelab.eu
/
build.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mkisofs is now known as genisoimage
[build.git]
/
lbuild-bridge.sh
diff --git
a/lbuild-bridge.sh
b/lbuild-bridge.sh
index
ecee98b
..
b0e3658
100755
(executable)
--- a/
lbuild-bridge.sh
+++ b/
lbuild-bridge.sh
@@
-22,13
+22,14
@@
for line in file("/proc/net/dev"):
if ifname.find("virbr")==0: continue
if ifname.find("veth")==0: continue
if ifname.find("tap")==0: continue
if ifname.find("virbr")==0: continue
if ifname.find("veth")==0: continue
if ifname.find("tap")==0: continue
+ if ifname.find("vif")==0: continue
print ifname
EOF
}
function discover_interface () {
for ifname in $(gather_interfaces); do
print ifname
EOF
}
function discover_interface () {
for ifname in $(gather_interfaces); do
- ip link show $ifname | grep -qi 'state UP' && { echo $ifname; return; }
+
ip link show $ifname | grep -qi 'state UP' && { echo $ifname; return; }
done
# still not found ? that's bad
echo unknown
done
# still not found ? that's bad
echo unknown
@@
-56,8
+57,8
@@
function create_bridge_if_needed() {
# already created ? - we're done
ip addr show $public_bridge >& /dev/null && {
# already created ? - we're done
ip addr show $public_bridge >& /dev/null && {
- echo "Bridge already set up - skipping create_bridge_if_needed"
- return 0
+
echo "Bridge already set up - skipping create_bridge_if_needed"
+
return 0
}
# find out the physical interface to bridge onto
}
# find out the physical interface to bridge onto
@@
-136,9
+137,9
@@
function create_bridge_if_needed() {
function main () {
if [[ -n "$@" ]] ; then
function main () {
if [[ -n "$@" ]] ; then
- public_bridge="$1"; shift
+
public_bridge="$1"; shift
else
else
- public_bridge="$DEFAULT_PUBLIC_BRIDGE"
+
public_bridge="$DEFAULT_PUBLIC_BRIDGE"
fi
create_bridge_if_needed $public_bridge
}
fi
create_bridge_if_needed $public_bridge
}