Blame


1 c8b6342d 2005-01-13 devnull .TH IMPORT 4
2 c8b6342d 2005-01-13 devnull .SH NAME
3 c8b6342d 2005-01-13 devnull import \- import 9P resources from another system
4 c8b6342d 2005-01-13 devnull .SH SYNOPSIS
5 c8b6342d 2005-01-13 devnull .B import
6 c8b6342d 2005-01-13 devnull [
7 351f474b 2008-12-07 rsc .B -dfx
8 c8b6342d 2005-01-13 devnull ]
9 c8b6342d 2005-01-13 devnull [
10 c8b6342d 2005-01-13 devnull .B -n
11 c8b6342d 2005-01-13 devnull .I ns
12 c8b6342d 2005-01-13 devnull ]
13 c8b6342d 2005-01-13 devnull [
14 c8b6342d 2005-01-13 devnull .B -p
15 c8b6342d 2005-01-13 devnull .I prog
16 c8b6342d 2005-01-13 devnull ]
17 c8b6342d 2005-01-13 devnull [
18 c8b6342d 2005-01-13 devnull .B -s
19 c8b6342d 2005-01-13 devnull .I service
20 c8b6342d 2005-01-13 devnull ]
21 c8b6342d 2005-01-13 devnull .I system
22 c8b6342d 2005-01-13 devnull .SH DESCRIPTION
23 c8b6342d 2005-01-13 devnull .I Import
24 c8b6342d 2005-01-13 devnull presents the 9P service
25 c8b6342d 2005-01-13 devnull .I service
26 c8b6342d 2005-01-13 devnull (default
27 c8b6342d 2005-01-13 devnull .BR plumb )
28 c8b6342d 2005-01-13 devnull running on
29 c8b6342d 2005-01-13 devnull .I system
30 c8b6342d 2005-01-13 devnull as a service on the local system,
31 c8b6342d 2005-01-13 devnull in the current name space.
32 c8b6342d 2005-01-13 devnull .PP
33 c8b6342d 2005-01-13 devnull The
34 c8b6342d 2005-01-13 devnull .B -n
35 c8b6342d 2005-01-13 devnull option sets the remote name space directory
36 c8b6342d 2005-01-13 devnull where
37 c8b6342d 2005-01-13 devnull .I import
38 c8b6342d 2005-01-13 devnull should expect to find
39 c8b6342d 2005-01-13 devnull .IR service .
40 c8b6342d 2005-01-13 devnull If it is not specified,
41 c8b6342d 2005-01-13 devnull .I import
42 c8b6342d 2005-01-13 devnull uses name of the local system's name space directory.
43 c8b6342d 2005-01-13 devnull (Since name space directories are conventionally inside
44 c8b6342d 2005-01-13 devnull .BR /tmp ,
45 c8b6342d 2005-01-13 devnull the path have different meanings on the two systems.)
46 c8b6342d 2005-01-13 devnull .PP
47 c8b6342d 2005-01-13 devnull .I Import
48 c8b6342d 2005-01-13 devnull connects to
49 c8b6342d 2005-01-13 devnull .I system
50 c8b6342d 2005-01-13 devnull using
51 d32deab1 2020-08-16 rsc .MR ssh (1) .
52 c8b6342d 2005-01-13 devnull It invokes
53 c8b6342d 2005-01-13 devnull .I import
54 c8b6342d 2005-01-13 devnull on the remote system to carry out the remote
55 c8b6342d 2005-01-13 devnull side of the protocol.
56 c8b6342d 2005-01-13 devnull The
57 c8b6342d 2005-01-13 devnull .B -p
58 c8b6342d 2005-01-13 devnull option specifies the path to
59 c8b6342d 2005-01-13 devnull .I import
60 c8b6342d 2005-01-13 devnull on the remote system, in case it is not in the system search path.
61 c8b6342d 2005-01-13 devnull .PP
62 c8b6342d 2005-01-13 devnull The
63 c8b6342d 2005-01-13 devnull .B -d
64 c8b6342d 2005-01-13 devnull option turns on debugging.
65 c8b6342d 2005-01-13 devnull The
66 c8b6342d 2005-01-13 devnull .B -f
67 c8b6342d 2005-01-13 devnull option keeps
68 c8b6342d 2005-01-13 devnull .I import
69 c8b6342d 2005-01-13 devnull from forking itself into the background, also useful for debugging.
70 351f474b 2008-12-07 rsc .PP
71 351f474b 2008-12-07 rsc The
72 351f474b 2008-12-07 rsc .B -x
73 351f474b 2008-12-07 rsc option reverses the roles of the two machines,
74 351f474b 2008-12-07 rsc exporting the service to, instead of importing it from,
75 351f474b 2008-12-07 rsc the remote system.
76 c8b6342d 2005-01-13 devnull .SH EXAMPLE
77 c8b6342d 2005-01-13 devnull Suppose you run
78 c8b6342d 2005-01-13 devnull .B sam
79 c8b6342d 2005-01-13 devnull .B -r
80 c8b6342d 2005-01-13 devnull to the CPU server
81 c8b6342d 2005-01-13 devnull .IR anna .
82 c8b6342d 2005-01-13 devnull .I Sam
83 c8b6342d 2005-01-13 devnull wants to talk to a plumber on the local terminal,
84 c8b6342d 2005-01-13 devnull but the file names will refer to files on
85 c8b6342d 2005-01-13 devnull .IR anna .
86 c8b6342d 2005-01-13 devnull .PP
87 c8b6342d 2005-01-13 devnull To fix this problem, create a new name space directory
88 c8b6342d 2005-01-13 devnull and start a new plumber on
89 c8b6342d 2005-01-13 devnull .IR anna :
90 c8b6342d 2005-01-13 devnull .IP
91 c8b6342d 2005-01-13 devnull .EX
92 c8b6342d 2005-01-13 devnull remotens=/tmp/ns.`whoami`.on.`hostname`
93 c8b6342d 2005-01-13 devnull ssh anna mkdir $remotens
94 c8b6342d 2005-01-13 devnull ssh anna NAMESPACE=$remotens plumber
95 c8b6342d 2005-01-13 devnull .EE
96 a192c140 2005-01-16 devnull .LP
97 c8b6342d 2005-01-13 devnull Now import that plumber to the local name space before starting
98 c8b6342d 2005-01-13 devnull .I sam
99 c8b6342d 2005-01-13 devnull and
100 c8b6342d 2005-01-13 devnull .IR 9term :
101 c8b6342d 2005-01-13 devnull .IP
102 c8b6342d 2005-01-13 devnull .EX
103 c8b6342d 2005-01-13 devnull NAMESPACE=/tmp/ns.anna
104 c8b6342d 2005-01-13 devnull mkdir $NAMESPACE
105 c8b6342d 2005-01-13 devnull import -n $remotens -s plumb anna
106 c8b6342d 2005-01-13 devnull sam &
107 c8b6342d 2005-01-13 devnull 9term ssh anna &
108 c8b6342d 2005-01-13 devnull .EE
109 c8b6342d 2005-01-13 devnull .SH SOURCE
110 c8b6342d 2005-01-13 devnull .B \*9/src/cmd/import.c
111 c8b6342d 2005-01-13 devnull .SH SEE ALSO
112 d32deab1 2020-08-16 rsc .MR 9pserve (4) ,
113 d32deab1 2020-08-16 rsc .MR intro (4)