Blob


1 .TH SRV 4
2 .SH NAME
3 srv, 9fs \- start network file service
4 .SH SYNOPSIS
5 .B srv
6 [
7 .B -a
8 ]
9 [
10 .B -k
11 .I keypattern
12 ]
13 .I address
14 [
15 .I srvname
16 ]
17 .PP
18 .B 9fs
19 .I system
20 .SH DESCRIPTION
21 .I Srv
22 dials the given address and initializes the connection to serve the 9P protocol.
23 It then posts the resulting connection in the current name space
24 (see
25 .IR intro (4))
26 as
27 .I srvname
28 (default
29 .IR address ).
30 .PP
31 The
32 .B -a
33 option causes
34 .I srv
35 to post a pre-authenticated connection to the file system
36 .I aname
37 (by default, the empty string;
38 see
39 .IR attach (9p)).
40 .I Srv
41 authenticates over the 9P connection to establish a valid auth fid.
42 .IR Keypattern ,
43 if specified, is used to select the key used for authentication.
44 Client attach requests are rewritten to use the specified
45 .I aname
46 and auth fid.
47 .PP
48 The
49 .I 9fs
50 command executes the
51 .I srv
52 necessary to make available the files of
53 .IR system .
54 .PP
55 .I 9fs
56 recognizes some special names,
57 such as
58 .B sources
59 to make the file server
60 .I sources.cs.bell-labs.com
61 available as service
62 .IR sources .
63 .I 9fs
64 is an
65 .IR rc (1)
66 script; examine it to see what local conventions apply.
67 .SH EXAMPLES
68 List the root directory on
69 .IR sources :
70 .IP
71 .EX
72 9fs sources
73 9p ls sources
74 .EE
75 .PP
76 Mount a remote file server
77 .I bootes
78 on Linux using the kernel 9P mount driver,
79 with
80 .I srv
81 handling authentication:
82 .IP
83 .EX
84 srv -a sources.cs.bell-labs.com sources
85 sudo mount -t 9P -o user=$USER,uid=`id -u`,gid=`id -g`,proto=unix
86 `namespace`/sources /n/sources
87 .EE
88 .SH SOURCE
89 .B \*9/src/cmd/srv.c
90 .br
91 .B \*9/bin/9fs
92 .SH "SEE ALSO
93 .IR dial (3),
94 .IR intro (4),
95 .IR netfiles (1)