aboutsummaryrefslogtreecommitdiff
path: root/man/man4/srv.4
blob: 1e8b91dea6593e6042f9c0a23d1aaa046cb821c9 (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
.TH SRV 4
.SH NAME
srv, 9fs \- start network file esrvice
.SH SYNOPSIS
.B srv
[
.B -a
]
[
.B -k
.I keypattern
]
.I address
[
.I srvname
]
.PP
.B 9fs
.I system
.SH DESCRIPTION
.I Srv
dials the given address and initializes the connection to serve the 9P protocol.
It then posts the resulting connection in the current name space 
(see
.IR intro (4))
as
.I srvname 
(default
.IR address ).
.PP
The
.B -a
option causes
.I srv
to post a pre-authenticated connection to the file system
.I aname
(by default, the empty string;
see
.IR attach (9p)).
.I Srv
authenticates over the 9P connection to establish a valid auth fid.
.IR Keypattern ,
if specified, is used to select the key used for authentication.
Client attach requests are rewritten to use the specified
.I aname
and auth fid.
.PP
The
.I 9fs
command executes the
.I srv
necessary to make available the files of 
.IR system .
.PP
.I 9fs
recognizes some special names,
such as
.B sources
to make the file server
.I sources.cs.bell-labs.com
available as service
.IR sources .
.I 9fs
is an
.IR rc (1)
script; examine it to see what local conventions apply.
.SH EXAMPLES
List the root directory on 
.IR sources :
.IP
.EX
9fs sources
9p ls sources
.EE
.PP
Mount a remote file server 
.I bootes
on Linux using the kernel 9P mount driver,
with 
.I srv
handling authentication:
.IP
.EX
srv -a sources.cs.bell-labs.com sources
sudo mount -t 9P -o user=$USER,uid=`id -u`,gid=`id -g`,proto=unix
           `namespace`/sources /n/sources
.EE
.SH SOURCE
.B \*9/src/cmd/srv.c
.br
.B \*9/bin/9fs
.SH "SEE ALSO
.IR dial (3),
.IR intro (4),
.IR netfiles (1)