enable ip forwarding on debian/ubuntu when running xcatconfig

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14973 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
xq2005 2013-01-24 05:14:34 +00:00
parent bb9d1f8cf1
commit 93a23bc8d2

View File

@ -469,6 +469,7 @@ sub setup_ip_forwarding
`grep "net.ipv4.ip_forward" $conf_file`;
if ($? == 0) {
`sed -i "s/^net.ipv4.ip_forward = .*/net.ipv4.ip_forward = $enable/" $conf_file`;
`sed -i "s/^#net.ipv4.ip_forward *= *.*/net.ipv4.ip_forward = $enable/" $conf_file`; #debian/ubuntu have different default format
} else {
`echo "net.ipv4.ip_forward = $enable" >> $conf_file`;
}