Blame tests/p_0-lftp/20_lftp_ftp.sh

root 6daf8d
#!/bin/sh
root d9b376
# Author: Piyush Kumar <piykumar@gmail.com>
root d9b376
# Author: Munish Kumar <munishktotech@gmail.com>
root d9b376
# Author: Ayush Gupta <ayush.001@gmail.com>
root d9b376
# Author: Konark Modi <modi.konark@gmail.com>
root 6daf8d
FILE=/tmp/test_lftp_ftp.txt
root 6daf8d
root 6daf8d
if [ $SKIP_QA_HARNESS ]; then
root 6daf8d
URL="ftp://ftp.freebsd.org/pub/FreeBSD/"
root 6daf8d
else
root 6daf8d
URL="ftp://ftp.freebsd.org/pub/FreeBSD/"
root 6daf8d
fi
root 6daf8d
root 6daf8d
root 6daf8d
lftp -e 'set net:timeout 10; get README.TXT -o $FILE; bye' $URL   > /dev/null 2>&1
root 6daf8d
t_Log "Running $0 - lftp test with FTP test."
root 6daf8d
if [ -f $FILE ]
root 6daf8d
  then
root 6daf8d
  grep -ci 'konark' $FILE
root 6daf8d
  ret_val=$?
root 6daf8d
  else
root 6daf8d
  t_Log "FTP test for lftp failed"
root 6daf8d
  ret_val=$?
root 6daf8d
fi
root 6daf8d
rm -f $FILE
root 6daf8d
t_CheckExitStatus $ret_val