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
untabified
[build.git]
/
lbuild-bridge.sh
diff --git
a/lbuild-bridge.sh
b/lbuild-bridge.sh
index
6bf317e
..
b0e3658
100755
(executable)
--- a/
lbuild-bridge.sh
+++ b/
lbuild-bridge.sh
@@
-29,7
+29,7
@@
EOF
function discover_interface () {
for ifname in $(gather_interfaces); do
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
@@
-57,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
@@
-137,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
}