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 -df
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 .IR 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 .SH EXAMPLE
71 Suppose you run
72 .B sam
73 .B -r
74 to the CPU server
75 .IR anna .
76 .I Sam
77 wants to talk to a plumber on the local terminal,
78 but the file names will refer to files on
79 .IR anna .
80 .PP
81 To fix this problem, create a new name space directory
82 and start a new plumber on
83 .IR anna :
84 .IP
85 .EX
86 remotens=/tmp/ns.`whoami`.on.`hostname`
87 ssh anna mkdir $remotens
88 ssh anna NAMESPACE=$remotens plumber
89 .EE
90 .LP
91 Now import that plumber to the local name space before starting
92 .I sam
93 and
94 .IR 9term :
95 .IP
96 .EX
97 NAMESPACE=/tmp/ns.anna
98 mkdir $NAMESPACE
99 import -n $remotens -s plumb anna
100 sam &
101 9term ssh anna &
102 .EE
103 .SH SOURCE
104 .B \*9/src/cmd/import.c
105 .SH SEE ALSO
106 .IR 9pserve (4),
107 .IR intro (4)