File: check

package info (click to toggle)
ftpcopy 0.6.7-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,496 kB
  • sloc: ansic: 10,233; sh: 1,651; makefile: 705; perl: 272
file content (53 lines) | stat: -rwxr-xr-x 1,449 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#! /bin/sh

package/packagecheck || exit 1

# The package self check needs:
# a) the publicfile ftpd           http://cr.yp.to/publicfile.html
# b) daemontools                   http://cr.yp.to/daemontools.html
# c) ucspi-tcp (for publicfile)    http://cr.yp.to/ucspi-tcp.html

ok=0

# need publicfile daemontools ucspi-tcp

# /usr/local/publicfile/bin/: as djb intended it.
# /usr/bin/:                  gentoo linux
# /usr/local/bin/:            FreeBSD port
for i in /usr/local/publicfile/bin/ /usr/bin/ /usr/local/bin/ ; do
  $i/ftpd 1 2 3 4 5 6 7 8 9 10 2>/dev/null >/dev/null                     
  if test "$?" = 20 ; then                                                
    ok=1                                                            
    PUBLICFILE_FTPD=$i/ftpd                                         
    export PUBLICFILE_FTPD                                          
    break                                                           
  fi                
done
if test "$ok" = 0 ; then                                                       
  fail="publicfile"  
fi

# check for daemontools
svc 2>/dev/null >/dev/null
if test "$?" = 0 ; then 
	:
else
	ok=0;
	fail="$fail daemontools"
fi

# check for ucspi-tcp
tcpserver 2>/dev/null >/dev/null
if test "$?" = 100 ; then 
	:
else
	ok=0;
	fail="$fail ucspi-tcp"
fi

if test "x$ok" = x0 ; then
	echo "Check not done: missing $fail" >&2
	exit 0
fi
cd compile || exit 1
exec make check