From 2daa5f7d6f107526b981fa47b7dfeca54269cd3b Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Thu, 21 Aug 2014 08:59:11 +0100 Subject: [PATCH] permit running 'wedo' without script installation --- README.md | 4 ++-- weave/wedo | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9b634b9d..d55071ed 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ Each host needs to have the following installed - `wedo` and `docker-ns` from the weave sub-directory. Install these somewhere in the root user's path, e.g. `/usr/local/bin'. -- [pipework][], by Jérôme Petazzoni. This too needs to be installed in - the root user's path. +- [pipework][], by Jérôme Petazzoni. Install this in the same place as + the aforementioned scripts. [pipework]: https://raw.githubusercontent.com/jpetazzo/pipework/master/pipework diff --git a/weave/wedo b/weave/wedo index fee29b98..857a866b 100755 --- a/weave/wedo +++ b/weave/wedo @@ -5,6 +5,7 @@ BRIDGE=weave CONTAINER_IFNAME=ethwe MTU=65535 +SCRIPT_DIR=$(dirname $(readlink -f $0)) COMMAND=$1 IPADDR=$2 shift 2 @@ -41,8 +42,8 @@ case "$COMMAND" in ;; esac -pipework $BRIDGE -i $CONTAINER_IFNAME $CONTAINER $IPADDR 1>&2 +${SCRIPT_DIR}/pipework $BRIDGE -i $CONTAINER_IFNAME $CONTAINER $IPADDR 1>&2 -docker-ns $CONTAINER ethtool -K $IFACE tx off > /dev/null +${SCRIPT_DIR}/docker-ns $CONTAINER ethtool -K $IFACE tx off > /dev/null echo $CONTAINER