minor fix
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6172 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
6ef8943a3f
commit
4ac1c3288c
@ -1255,21 +1255,21 @@ sub setup_HTTP
|
||||
#-----------------------------------------------------------------------------
|
||||
sub setup_ip_forwarding
|
||||
{
|
||||
my $rc=0;
|
||||
if (xCAT::Utils->isLinux()) {
|
||||
my $conf_file="/etc/sysctl.conf";
|
||||
my $rc=`grep "net.ipv4.ip_forward" $conf_file`;
|
||||
$rc=`grep "net.ipv4.ip_forward" $conf_file`;
|
||||
if ($? == 0) {
|
||||
`sed -i "s/^net.ipv4.ip_forward = 0/net.ipv4.ip_forward = 1/" $conf_file`;
|
||||
} else {
|
||||
`echo "net.ipv4.ip_forward = 1" >> $conf_file`;
|
||||
}
|
||||
$rc = `sysctl -p $conf_file`;
|
||||
return $rc;
|
||||
}
|
||||
else
|
||||
{ #AIX: TODO
|
||||
}
|
||||
|
||||
return $rc;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user