summaryrefslogtreecommitdiff
path: root/static/unix-v10/man8/dist.8
blob: 37f65622fbdbbb2eafb1e3814f4149ebfa8753f0 (plain)
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
.TH DIST 8
.ds ld /usr/lib/dist
.SH NAME
connect, dispatch \(mi generic network client and server
.PP
query, receive, notify \(mi network clients
.PP
answer, transmit, notified \(mi network servers
.SH SYNOPSIS
.B \*(ld/connect
.I remote-system remote-cmd io local-cmd local-args
.PP
.B \*(ld/query
.PP
.B \*(ld/receive
.I package-id
.PP
.B \*(ld/notify
.I package-id
.PP
.B \*(ld/dispatch
.I remote-system remote-user
.PP
.B \*(ld/answer
.I remote-system remote-user
.PP
.B \*(ld/transmit
.I remote-system remote-user
.PP
.B \*(ld/notified
.I remote-system remote-user
.SH DESCRIPTION
These programs act behind the scenes on behalf of
.IR dist (1).
.I Connect
and
.I dispatch
deal with all the details of establishing and authenticating connections
on the network.  The remaining programs are independent of the underlying
network.
.PP
.I Connect
encapsulates all the details of making a call on the underlying network.
Its arguments are mostly self explanatory.
.I Remote-cmd
must be one of
.BR answer ", " transmit ", or " notified "."
If
.I io
is
.BR i ,
the standard input of the local command is connected
to the standard output of the remote command.  If
.B i
is not specified, the local command inherits its local
standard input, and the remote command has its standard
output directed to a log file.
Similarly,
.B o
means the standard output of the local command is connected
to the standard input of the remote command.  If
.B o
is not specified, the local command inherits its local
standard output, and the remote command has its standard
input attached to
.BR /dev/null .
Legal possibilities are
.BR i ,
.BR o ,
and
.BR io.
.PP
.I Dispatch
is intended to be called by a generic network daemon
such as
.IR svcmgr (8).
It talks to
.I connect
and takes care of establishing the appropriate standard input and
output before calling
.IR answer ,
.IR transmit ,
or
.IR notified .
.I Dispatch
expects arguments giving the remote system, remote user, and remote
address, and passes these to whatever program it calls.
.PP
.I Query
is a simple program called by
.I connect
with its standard input attached to the remote
.IR answer .
.I Query
displays a formatted version of the queue list from the remote machine.
(It may even turn out to be the same as
.BR /bin/cat .)
.PP
.I Receive
is a more complicated program that is called by
.I connect
with both its input and output attached to the remote
.IR transmit .
.I Receive
performs actual software installation and sends a transcript of any
errors back to the remote system.
.PP
.I Notify
is a simple program called by
.I connect
with its standard output attached to the remote
.IR notified .
.I Notify
sends an announcement of the availability of some specific package.
.PP
All of the servers read a configuration file,
.BR \*(ld/conf ,
to determine how to handle installation on behalf
of a given remote system and user.  The file consists of lines
containing patterns and actions.  Empty lines or lines beginning
with a '\c
.BR "#" "'"
are ignored.  The first three fields (separated by white space)
of each line are regular
expressions to be matched the remote system name, remote user name,
and file name respectively.  The first line in which all three match
will be chosen.
The remainder of the line contains
the associated actions.
Each action is an alphanumeric name, optionally followed immediately
by a parenthesized argument.
.PP
Someday the actions will be enumerated here, but I don't know what
they are yet.
.SH EXAMPLES
A simple configuration file:
.EX
.ta \w'00000000'u +\w'00000000'u +\w'00000000'u +\w'00000000'u +\w'00000000'u +\w'00000000'u
# system	user		pathname	action
# we are willing to distribute stuff to coma and pyxis.
(coma|pyxis)	.*		.*		accept(yes)
\&.*		.*		.*		accept(no)
.EE
.SH "SEE ALSO"
.IR dist (1),
.IR dist (5)