[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/cman/init.d cman



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	pcaulfield sourceware org	2007-12-11 14:04:27

Modified files:
	cman/init.d    : cman 

Log message:
	Some small fixes to the networking param code, thanks to Fabio on IRC

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/init.d/cman.diff?cvsroot=cluster&r1=1.33&r2=1.34

--- cluster/cman/init.d/cman	2007/12/11 11:22:10	1.33
+++ cluster/cman/init.d/cman	2007/12/11 14:04:26	1.34
@@ -216,17 +216,22 @@
 
 set_networking_params()
 {
-	value=`cat /proc/sys/net/core/rmem_default`
-	if [ $value -le $NET_RMEM_DEFAULT ]
-	then
-		echo $NET_RMEM_DEFAULT > /proc/sys/net/core/rmem_default
-	fi
-
-        value=`cat /proc/sys/net/core/rmem_max`
-        if [ $value -le $NET_RMEM_MAX ]
+    if [ ! -f  /proc/sys/net/core/rmem_default ]
+    then
+	return 0;
+    fi
+   
+    value="$(cat /proc/sys/net/core/rmem_default)"
+    if [ $value -le $NET_RMEM_DEFAULT ]
+    then
+	echo $NET_RMEM_DEFAULT > /proc/sys/net/core/rmem_default
+    fi
+    
+    value="$(cat /proc/sys/net/core/rmem_max)"
+    if [ $value -le $NET_RMEM_MAX ]
         then
-                echo $NET_RMEM_MAX > /proc/sys/net/core/rmem_max
-        fi
+        echo $NET_RMEM_MAX > /proc/sys/net/core/rmem_max
+    fi
 }
 
 start()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]