Don't fast-fail if weave isn't present

This commit is contained in:
Peter Bourgon
2015-07-15 11:57:48 +02:00
parent c9e74f754d
commit 53e70b02f4

2
scope
View File

@@ -27,7 +27,7 @@ HOSTNAME=scope
DOMAINNAME=weave.local
FQDN=$HOSTNAME.$DOMAINNAME
DOCKER_BRIDGE=${DOCKER_BRIDGE:-docker0}
WEAVE=$(which weave)
WEAVE=$(set +e; which weave)
IP_REGEXP="[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}"
IP_ADDR_CMD="find /sys/class/net -type l | xargs -n1 basename | grep -vE 'docker|veth|lo' | \
xargs -n1 ip addr show | grep inet | awk '{ print \$2 }' | grep -oE '$IP_REGEXP'"