Преглед изворни кода

workaround for weird issue on OpenVZ

Serghey Rodin пре 9 година
родитељ
комит
028a7a5fe7
1 измењених фајлова са 8 додато и 0 уклоњено
  1. 8 0
      bin/v-update-firewall

+ 8 - 0
bin/v-update-firewall

@@ -173,6 +173,14 @@ else
     fi
 fi
 
+# Worarkound for OpenVZ
+if [ -e "/proc/vz/veinfo" ]; then
+    dig @8.8.8.8 google.com +time=1 +tries=1 >/dev/null 2>&1
+    if [ "$?" -ne 0 ]; then
+        $BIN/v-stop-firewall
+    fi
+fi
+
 
 #----------------------------------------------------------#
 #                       Vesta                              #