SVN: rc-scripts/trunk/rc.d/init.d/functions

glen glen at pld-linux.org
Mon Jun 20 17:04:30 CEST 2011


Author: glen
Date: Mon Jun 20 17:04:29 2011
New Revision: 12247

Modified:
   rc-scripts/trunk/rc.d/init.d/functions
Log:
- compat mode for old kernels, where network lock was not touched

Modified: rc-scripts/trunk/rc.d/init.d/functions
==============================================================================
--- rc-scripts/trunk/rc.d/init.d/functions	(original)
+++ rc-scripts/trunk/rc.d/init.d/functions	Mon Jun 20 17:04:29 2011
@@ -77,11 +77,16 @@
 if [ -z "$VSERVER_ISOLATION_NET" -o "$VSERVER_ISOLATION_NET" = "detect" ]; then
 	VSERVER_ISOLATION_NET=no
 	if [ "$VSERVER" = "yes" ]; then
-		{
-			while read _t _data; do
-				[ "$_t" = "net:" ] && break
-			done < /proc/self/nsproxy
-		} 2> /dev/null
+		if [ -f /proc/self/nsproxy ]; then
+			{
+				while read _t _data; do
+					[ "$_t" = "net:" ] && break
+				done < /proc/self/nsproxy
+			} 2> /dev/null
+		else
+			# assume old kernel mode
+			VSERVER_ISOLATION_NET=yes
+		fi
 		if [ "${_data##*\(}" = "I)" ]; then
 			VSERVER_ISOLATION_NET=yes
 		fi


More information about the pld-cvs-commit mailing list