commit 78ef67a523e7f2589e49a082376ee56ce1a5d76e Author: Peter Volkov Date: Tue Mar 31 13:03:44 2009 +0400 Issue warning if forwarding is disabled In case forwarding is disabled let's warn user about that. This is alternative solution for http://bugzilla.openvz.org/show_bug.cgi?id=1079 diff --git a/etc/init.d/vz-gentoo.in b/etc/init.d/vz-gentoo.in index dc87d41..7c57370 100755 --- a/etc/init.d/vz-gentoo.in +++ b/etc/init.d/vz-gentoo.in @@ -128,6 +128,11 @@ start_net() { ebegin "Configuring interface ${VZDEV}" /sbin/sysctl -q -w net.ipv4.conf.${VZDEV}.send_redirects=0 eend $? + + if [ "x$(/sbin/sysctl net.ipv4.ip_forward 2>/dev/null | awk '{print $3}')" = "x0" ]; then + ewarn "It looks like you have ip forwarding disabled. To make networking" + ewarn "available for containers, please, run sysctl -w net.ipv4.ip_forward=1" + fi } stop_net() {