]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- compat mode for old kernels, where network lock was not touched
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 20 Jun 2011 15:04:29 +0000 (15:04 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Mon, 20 Jun 2011 15:04:29 +0000 (15:04 +0000)
svn-id: @12247

rc.d/init.d/functions

index 15f867a9cff853ad0174ed7f7651568707ee5e26..804e7dacaefb57ebfd06215ccbb2dbdb87fce6f0 100644 (file)
@@ -77,11 +77,16 @@ fi
 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
This page took 0.35402 seconds and 4 git commands to generate.