blob: 666781d8ab684d8c113fa7abf44fa0ad519be49b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
|