diff --git a/README.md b/README.md index 52c741f3..804357fe 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,9 @@ capabilities, so these can continue to be used by containers. To run weave on a host, you need to install... -1. docker. We've tested with versions 0.9.1 through 1.2.0, but other - versions should work too. +1. Linux and Docker. We've tested with Docker versions 0.9.1 through + 1.2.0, but other versions should work too. Linux kernels after 3.5 + are known to work; the newer the better. 2. weave. Install this with sudo wget -O /usr/local/bin/weave \ diff --git a/weave b/weave index 270e3778..02c501f1 100755 --- a/weave +++ b/weave @@ -338,6 +338,19 @@ container_weave_addrs() { ip netns exec $NETNS ip addr show dev $CONTAINER_IFNAME } +uname_sys=`uname -s` +uname_rel_major=`uname -r | cut -d. -f1` +uname_rel_minor=`uname -r | cut -d. -f2` + +[ ! $uname_sys = 'Linux' ] && { + echo "ERROR: Operating systems other than Linux are not supported (you have $uname_sys)" >&2 + exit 1 +} + +(([ $uname_rel_major -eq 3 ] && [ $uname_rel_minor -ge 5 ]) || [ $uname_rel_major -gt 3 ]) || { + echo "WARNING: Linux kernel version 3.5 or newer is required (you have `uname -sr`)" >&2 +} + case "$COMMAND" in launch) check_not_running $CONTAINER_NAME $IMAGE