Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_fixcpp/sys/man/4/srv – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
.TH SRV 4 
2
.SH NAME
3
srv, srvold9p, 9fs, srvssh \- start network file service
4
.SH SYNOPSIS
5
.B srv
6
[
7
.B -abcCemnq
8
] [
9
.B -s
10
.I seconds
11
]
12
.RI [ net !] system\c
13
.RI [! service ]
14
[
15
.I srvname
16
[
17
.I mtpt
18
] ]
19
.PP
20
.B srvssh
21
[
22
.B -r
23
]
24
[
25
.B -R
26
]
27
[
28
.B -s
29
]
30
[
31
.B -u
32
.I u9fspath
33
]
34
.I system
35
[
36
.I srvname
37
[
38
.I mtpt
39
] ]
40
.PP
41
.B 9fs
42
.RI [ net !] system
43
.RI [ mountpoint ]
44
.PP
45
.in +0.5i
46
.ti -0.5i
47
.B srvold9p
48
[
49
.B -abcCdF
50
] [
51
.B -p
52
.I servicename
53
] [
54
.B -s
55
|
56
.B -m
57
.I mountpoint
58
] [
59
.B -u
60
.I user
61
] [
62
.B -x
63
.I command
64
|
65
.B -n
66
.I network-addr
67
|
68
.B -f
69
.I file
70
]
71
.br
72
.in -0.5i
73
.SH DESCRIPTION
74
.I Srv
75
dials the given machine and initializes the connection to serve the
76
9P protocol.
77
By default, it connects to the
78
.L 9fs
79
(9P)
80
service, which for TCP is port 564.
81
It then creates in
82
.B /srv
83
a file named
84
.IR srvname .
85
Users can then
86
.B mount
87
(see
88
.IR bind (1))
89
the service, typically on a name in
90
.BR /n ,
91
to access the files provided by the remote machine.
92
If
93
.I srvname
94
is omitted, the first argument to
95
.I srv
96
is used.
97
Option
98
.B m
99
directs
100
.I srv
101
to mount the service on
102
.BI /n/ system
103
or onto
104
.I mtpt
105
if it is given.
106
Option
107
.B q
108
suppresses complaints if the
109
.B /srv
110
file already exists.
111
The 
112
.BR a ,
113
.BR b ,
114
.BR c ,
115
.BR C ,
116
and
117
.B n
118
options are used to control the mount flags as in
119
.I mount
120
(see
121
.IR bind (1)).
122
The
123
.B e
124
option causes
125
.I srv
126
to treat
127
.I system
128
as a shell command to be executed rather than
129
an address to be dialed.
130
The
131
.B s
132
option causes
133
.I srv
134
to sleep for the specified number of seconds
135
after establishing the connection
136
before posting and mounting it.
137
This is sometimes needed by
138
.IR srvssh .
139
.PP
140
The specified
141
.I service
142
must serve 9P.  Usually
143
.I service
144
can be omitted; when calling some
145
non-Plan-9 systems, a
146
.I service
147
such as
148
.B u9fs
149
must be mentioned explicitly.
150
.PP
151
The
152
.I 9fs
153
command does the
154
.I srv
155
and the
156
.I mount
157
necessary to make available the files of
158
.I system
159
on network
160
.IR net .
161
The files are mounted on
162
.IR mountpoint ,
163
if given;
164
otherwise they are mounted on
165
.BI /n/ system\f1.
166
If
167
.I system
168
contains
169
.L /
170
characters, only the last element of
171
.I system
172
is used in the
173
.B /n
174
name.
175
.PP
176
.I 9fs
177
recognizes some special names, such as
178
.B dump
179
to make the dump file system available on
180
.BR /n/dump .
181
.I 9fs
182
is an
183
.IR rc (1)
184
script; examine it to see what local conventions apply.
185
.PP
186
.I Srvssh
187
is an
188
.IR rc (1)
189
command that
190
connects to a remote Unix system via 
191
.IR ssh (1)
192
and starts
193
.IR u9fs (4).
194
The
195
.B -u
196
option specifies the path to the
197
.B u9fs
198
binary on the remote system.
199
(By default, an unrooted path of
200
.B u9fs
201
is used; if the binary is in the path of
202
the remote SSH server, you don't need the
203
.B -u
204
option.)
205
For information about the other options,
206
see the introductory comment in
207
.BR /rc/bin/srvssh .
208
The arguments are the same as
209
.IR srv .
210
.PP
211
.I Srvold9p
212
is a compatibilty hack to allow Fourth Edition Plan 9 systems
213
to connect to older 9P servers.
214
It functions as a variant of
215
.I srv
216
that performs a version translation on the 9P messages on the underlying connection.
217
Some of its options are the same as those of
218
.IR srv ;
219
the special ones are:
220
.TF "-x commandxx"
221
.PD
222
.TP
223
.B -d
224
Enable debugging.
225
.TP
226
.B -F
227
Insert a special (internal) filter process to the connection to maintain
228
message boundaries; usually only needed on TCP connections.
229
.TP
230
.BI -p\  servicename
231
Post the service under
232
.IR srv (3)
233
as
234
.BI /srv/ servicename\f1.
235
.TP
236
.BI -u\  user
237
When connecting to the remote server, log in as
238
.IR user .
239
Since
240
.I srvold9p
241
does no authentication, and since new kernels cannot authenticate to
242
old services, the likeliest value of
243
.I user
244
is
245
.BR none .
246
.TP
247
.BI -x\  command
248
Run
249
.I command
250
and use its standard input and output as the 9P service connection.
251
If the
252
.I command
253
string contains blanks, it should be quoted.
254
.TP
255
.BI -n\  network-addr
256
Dial
257
.I network-addr
258
to establish the connection.
259
.TP
260
.BI -f\  file
261
Use
262
.I file
263
(typically an existing
264
.IR srv (3)
265
file) as the connection.
266
.PP
267
.I Srvold9p
268
is run automatically when a
269
.IR cpu (1)
270
call is received on the service port for the old protocol.
271
.SH EXAMPLES
272
To see kremvax's and deepthought's files in
273
.B /n/kremvax
274
and
275
.BR /n/deepthought :
276
.IP
277
.EX
278
9fs kremvax
279
9fs hhgttg /n/deepthought
280
.EE
281
.PP
282
To mount as user
283
.B none
284
a connection to an older server kgbsun:
285
.IP
286
.EX
287
srvold9p -u none -m /n/kgbsun -p kgbsun -n il!kgbsun
288
.EE
289
.PP
290
Other windows may then mount the connection directly:
291
.IP
292
.EX
293
mount /srv/kgbsun /n/kgbsun
294
.EE
295
.PP
296
To connect to an instance of the Unix server
297
.IR u9fs (4)
298
started via
299
.IR ssh (1):
300
.IP
301
.EX
302
srvssh unix
303
.EE
304
.SH FILES
305
.TF /srv/*
306
.TP
307
.B /srv/*
308
ports to file systems and servers posted by
309
.I srv
310
and
311
.I 9fs
312
.SH SOURCE
313
.B /sys/src/cmd/srv.c
314
.br
315
.B /rc/bin/9fs
316
.br
317
.B /rc/bin/srvssh
318
.br
319
.B /sys/src/cmd/srvold9p
320
.SH "SEE ALSO"
321
.IR bind (1),
322
.IR auth (2),
323
.IR dial (2),
324
.IR srv (3),
325
.IR exportfs (4),
326
.IR import (4),
327
.IR ftpfs (4),
328
.IR u9fs (4)
329
.SH BUGS
330
.I Srv
331
does not explicitly report failures of
332
.I auth_proxy
333
(see
334
.IR auth (2));
335
.I mount
336
(see
337
.IR bind (1))
338
does.