summaryrefslogtreecommitdiffstats
path: root/PCBSD/pc-sysinstall/backend-query/test-netup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'PCBSD/pc-sysinstall/backend-query/test-netup.sh')
-rwxr-xr-xPCBSD/pc-sysinstall/backend-query/test-netup.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/PCBSD/pc-sysinstall/backend-query/test-netup.sh b/PCBSD/pc-sysinstall/backend-query/test-netup.sh
new file mode 100755
index 0000000..666781d
--- /dev/null
+++ b/PCBSD/pc-sysinstall/backend-query/test-netup.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+# Script which tests "fetch" when using a network connection, and saves
+# if we are using direct connect, or need FTP passive mode
+#############################################################################
+
+rm ${TMPDIR}/.testftp >/dev/null 2>/dev/null
+
+ping -c 2 www.pcbsd.org >/dev/null 2>/dev/null
+if [ "$?" = "0" ]
+then
+ echo "ftp: Up"
+ exit 0
+fi
+
+ping -c 2 www.freebsd.org >/dev/null 2>/dev/null
+if [ "$?" = "0" ]
+then
+ echo "ftp: Up"
+ exit 0
+fi
+
+echo "ftp: Down"
+exit 1
OpenPOWER on IntegriCloud