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:
1 parent
0c249fa126
commit
a71e90ddb8
1 file changed
-2
@@ -1494,7 +1494,6 @@ case "$COMMAND" in
|
|||||||
[ $# -eq 2 -a "$1" = "-h" ] || usage
|
[ $# -eq 2 -a "$1" = "-h" ] || usage
|
||||||
FQDN="$2"
|
FQDN="$2"
|
||||||
fi
|
fi
|
||||||
create_bridge
|
|
||||||
expose_ip
|
expose_ip
|
||||||
show_addrs $ALL_CIDRS
|
show_addrs $ALL_CIDRS
|
||||||
;;
|
;;
|
||||||
@@ -1502,7 +1501,6 @@ case "$COMMAND" in
|
|||||||
collect_cidr_args "$@"
|
collect_cidr_args "$@"
|
||||||
shift $CIDR_ARG_COUNT
|
shift $CIDR_ARG_COUNT
|
||||||
ipam_cidrs lookup weave:expose $CIDR_ARGS
|
ipam_cidrs lookup weave:expose $CIDR_ARGS
|
||||||
create_bridge
|
|
||||||
for CIDR in $ALL_CIDRS ; do
|
for CIDR in $ALL_CIDRS ; do
|
||||||
if ip addr show dev $BRIDGE | grep -qF $CIDR ; then
|
if ip addr show dev $BRIDGE | grep -qF $CIDR ; then
|
||||||
ip addr del dev $BRIDGE $CIDR
|
ip addr del dev $BRIDGE $CIDR
|
||||||
|
|||||||
Reference in new issue
Block a user