[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
Branch: 	RHEL50
Changes by:	rmccabe sourceware org	2007-05-10 21:45:58

Modified files:
	cman/init.d    : cman 

Log message:
	Don't workaround xend bridged networking on non-xen kernels.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/init.d/cman.diff?cvsroot=cluster&only_with_tag=RHEL50&r1=1.26.4.3&r2=1.26.4.4

--- cluster/cman/init.d/cman	2007/04/27 22:08:40	1.26.4.3
+++ cluster/cman/init.d/cman	2007/05/10 21:45:58	1.26.4.4
@@ -133,6 +133,9 @@
 }
 
 xend_bridged_net_enabled() {
+	# Not a xen kernel
+	test -d /proc/xen || return 1
+
     current_runlevel=$(/sbin/runlevel 2>/dev/null | awk '{ print $2 }' 2>/dev/null)
     if [ -z "$current_runlevel" ]; then
         errmsg='Unable to determine the current runlevel'
@@ -150,7 +153,7 @@
         return 1
     fi
 
-    egrep "^[[:blank:]]*\([[:blank:]]*network-script[[:blank:]]+network-bridge([[:blank:]]*\)|[[:blank:]]+)" /etc/xen/xend-config.sxp 2>/dev/null
+    egrep "^[[:blank:]]*\([[:blank:]]*network-script[[:blank:]]+network-bridge([[:blank:]]*\)|[[:blank:]]+)" /etc/xen/xend-config.sxp >/dev/null 2>/dev/null
     if [ $? -ne 0 ]; then
         # xend isn't configured to use bridged networking.
         return 1
@@ -296,7 +299,10 @@
     if [ $? -eq 0 ]
     then
 	errmsg=$( /bin/umount /sys/kernel/config 2>&1 )
-	return $?
+	if [ $? -ne 0 ]
+	then
+	    echo -n $errmsg " "
+	fi
     fi
     return 0
 }


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