Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=1ec... Commit: 1ece3abed41a6debf4175201c4061108e9034e68 Parent: 9fe781d4070527ea89acd848a5d50f3d24302f90 Author: Fabio M. Di Nitto fdinitto@redhat.com AuthorDate: Mon Oct 19 06:46:36 2009 +0200 Committer: Fabio M. Di Nitto fdinitto@redhat.com CommitterDate: Mon Oct 19 06:46:36 2009 +0200
cman init: fix set_networking_params
Do not fail if the current value of rmem_default or rmem_max are already higher than the minimum required. rhbz#529498
Check that the requested value is active.
Signed-off-by: Fabio M. Di Nitto fdinitto@redhat.com --- cman/init.d/cman.in | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in index 055abda..b5b6192 100644 --- a/cman/init.d/cman.in +++ b/cman/init.d/cman.in @@ -499,15 +499,19 @@ set_networking_params()
[ ! -f $rmemdefault ] && return 0
- value="$(cat $rmemdefault)" - - [ $value -le $NET_RMEM_DEFAULT ] && \ + if [ "$(cat $rmemdefault)" -lt $NET_RMEM_DEFAULT ]; then echo $NET_RMEM_DEFAULT > $rmemdefault + [ "$(cat $rmemdefault)" != $NET_RMEM_DEFAULT ] && return 1 + fi
- value="$(cat /proc/sys/net/core/rmem_max)" + rmemmax="/proc/sys/net/core/rmem_max"
- [ $value -le $NET_RMEM_MAX ] && \ + if [ "$(cat $rmemmax)" -lt $NET_RMEM_MAX ]; then echo $NET_RMEM_MAX > /proc/sys/net/core/rmem_max + [ "$(cat $rmemmax)" -lt $NET_RMEM_MAX ] && return 1 + fi + + return 0 }
start_cman()
cluster-commits@lists.fedorahosted.org