Do not create bridge upon "weave expose" or "weave hide"

Both cmds depend on running weaver which creates the bridge
during its initialization. So, calling "create_bridge"
during execution of the cmds is redundant.
This commit is contained in:
Martynas Pumputis committed 2017-12-16 20:52:24 +01:00
1 parent 0c249fa126
commit a71e90ddb8
1 file changed
-2
-2
View File
@@ -1494,7 +1494,6 @@ case "$COMMAND" in
[ $# -eq 2 -a "$1" = "-h" ] || usage
FQDN="$2"
fi
create_bridge
expose_ip
show_addrs $ALL_CIDRS
;;
@@ -1502,7 +1501,6 @@ case "$COMMAND" in
collect_cidr_args "$@"
shift $CIDR_ARG_COUNT
ipam_cidrs lookup weave:expose $CIDR_ARGS
create_bridge
for CIDR in $ALL_CIDRS ; do
if ip addr show dev $BRIDGE | grep -qF $CIDR ; then
ip addr del dev $BRIDGE $CIDR