Procházet zdrojové kódy

Check AFP and SMB -- apparently some modems intercept SMB traffic. This is slightly out-of-band but should be pretty reliable. It also leaks less data about our intent when the endpoint is unreachable (as is the common case on public networks)

Zachary Kotlarek před 10 roky
rodič
revize
692cc80895
1 změnil soubory, kde provedl 4 přidání a 3 odebrání
  1. 4 3
      mountMedia

+ 4 - 3
mountMedia

@@ -74,9 +74,10 @@ if [ $LOCAL_LINK -eq 0 ] && [ $FORCE -eq 0 ] && ~/bin/video/isMediaMounted; then
 fi
 
 # Check for connectivity and server live-ness
-if ! ~/bin/video/timeout -t "${TIMEOUT}" nc -z "${HOST}" 139 >/dev/null 2>&1; then
-	echo "`basename "${0}"`: Host not available: ${HOST}" 1>&2
-	OFFLINE=1
+if ! ~/bin/video/timeout -t "${TIMEOUT}" nc -z "${HOST}" 548 >/dev/null 2>&1 || \
+	! ~/bin/video/timeout -t "${TIMEOUT}" nc -z "${HOST}" 139 >/dev/null 2>&1; then
+		echo "`basename "${0}"`: Host not available: ${HOST}" 1>&2
+		OFFLINE=1
 fi
 
 # Drop local links if we're online