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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
.TH SRV 8 obsolete
.SH NAME
srv \- start services
.SH SYNOPSIS
.B lib/srv
[
.BI -n " nsfile"
]
[
.B -v
]
[
.B -s
]
.SH DESCRIPTION
.I Srv
starts listeners for local network services.
It is now considered obsolete: see
.IR svc (8),
which replaces it using
.IR sh (1)
and
.IR listen (1).
.PP
If the file
.B /services/namespace
exists,
.I srv
builds a new name space using
.IR newns (2).
The
.B -n
option may be used to supply a different file.
.I Srv
then starts a listener for each service configured in
.BR /services/server/config .
.PP
The configuration file is a text file.
Empty lines and lines beginning
.B #
are comments, and ignored.
Each non-comment line has at least four fields:
the server type, the service name, the network name on which to announce the service
(typically
.B tcp
or
.BR udp ),
and the path name of the service command (module).
Any further arguments are passed as arguments to that command.
.PP
Normally the server type field contains the letter
.BR S ,
and
.I srv
announces the service on the network itself, listens for incoming calls,
and on each call invokes the command with any arguments given.
The standard input and output of the command are set to refer to the
network connection.
If the server type field contains the letter
.BR M ,
however,
.I srv
starts the given command once during its own initialisation, and leaves the server
to announce and manage its incoming calls.
This is typically used to start self-contained services such as
.B bootp
and
.BR tftpd .
The diagnostics from all servers will appear on the standard
error of
.I srv
itself.
.PP
For example, the default configuration file includes the following lines:
.PP
.EX
.ps -2
S infsigner tcp /dis/auth/signer.dis
S infcsigner tcp /dis/auth/countersigner.dis
S inflogin tcp /dis/auth/logind.dis
S styx tcp /dis/lib/styxd.dis none clear sha md5 rc4 sha/rc4 md5/rc4
S rstyx tcp /dis/lib/rstyxd.dis none clear sha md5 rc4 sha/rc4 md5/rc4
S infdb tcp /dis/lib/dbsrv.dis none clear sha md5 rc4 sha/rc4 md5/rc4
S virgil udp /dis/lib/virgild.dis
.ps +2
.EE
.PP
The arguments to
.IR rstyxd
and
.IR stxyd
(see
.IR rstyxd (8)),
and
.IR dbsrv (7)
should list the security algorithms supported by the server's
.IR ssl (3).
.SH FILES
.B /services/namespace
.br
.B /services/server/config
.SH SOURCE
.B /appl/lib/srv.b
.SH SEE ALSO
.IR listen (1),
.IR services (6),
.IR cs (8),
.IR dbsrv (7),
.IR rstyxd (8),
.IR svc (8)
.SH BUGS
Each service should arguably start in a minimal name space.
|