Merge pull request #202 from errordeveloper/issue185_min_kernel_version

Add kernel version check and document in README
This commit is contained in:
Michael Bridgen committed 2014-11-19 16:40:33 +00:00
commit abba2f6b66
2 files changed
+16 -2

No files matched your search

+3 -2
View File
@@ -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 \
+13
View File
@@ -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