This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add the files from dist/meta to perl's repo
[metaconfig.git] / dist / U / d_inetd.U
1 ?RCS: $Id: d_inetd.U 1 2006-08-24 12:32:52Z rmanfredi $
2 ?RCS:
3 ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
4 ?RCS: 
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 4.0.
10 ?RCS:
11 ?RCS: $Log: d_inetd.U,v $
12 ?RCS: Revision 3.0  1993/08/18  12:06:23  ram
13 ?RCS: Baseline for dist 3.0 netwide release.
14 ?RCS:
15 ?MAKE:d_inetd: cat test package Myread Setvar
16 ?MAKE:  -pick add $@ %<
17 ?S:d_inetd:
18 ?S:     This symbol conditionally defines USE_INETD which indicates to the C
19 ?S:     program that the initial socket connection will be done via inetd.
20 ?S:.
21 ?C:USE_INETD (INETD):
22 ?C:     This symbol if defined indicates to the C program that inetd will be
23 ?C:     in charge of the initial socket connection. The file descriptors 0 and
24 ?C:     1 have been dup()ed from the original connected socket descriptor and
25 ?C:     are ready for send() and recv().
26 ?C:.
27 ?H:#$d_inetd USE_INETD          /**/
28 ?H:.
29 ?LINT:set d_inetd
30 : ask whether initial socket connection is to be done via inetd
31 echo " "
32 dflt=n
33 case "$d_inetd" in
34 '') if $test -f /etc/inetd.conf; then
35                 $cat <<EOM
36 Your system provides a so called "Internet super-server", the inetd daemon.
37 Network services like ftp or rlogin are usually handled via ftpd and rlogind
38 daemons. Without inetd, these daemons must always be running for the service
39 to be on. On the contrary, inetd listens to specific ports defined in file
40 /etc/inetd.conf and will run the appropriate daemon upon request. This scheme
41 avoids eating up the process table and memory with useless daemons.
42
43 I can set up things so that internet connections for $package will be done
44 using inetd, in which case you will have to edit /etc/inetd.conf to add some
45 specific informations.
46
47 EOM
48                 dflt=y
49         else
50                 $cat <<EOM
51 I do not see any trace of a configuration file for inetd, hence I assume your
52 system does not support the so called "Internet super-server". This means
53 $package will need to have a daemon process running on this machine to allow
54 network connections.
55
56 EOM
57         fi;;
58 *) case "$d_inetd" in
59         "$define") dflt=y;;
60         esac;;
61 esac
62 rp='Do you wish to use inetd for network connections?'
63 . ./myread
64 val="$undef"
65 case "$ans" in
66 y*|Y*) val="$define";;
67 esac
68 set d_inetd
69 eval $setvar
70