Blob


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