blob: 87480a821eb015c9f6acb1aedf78b6aa6a497802 (
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
96
97
98
99
100
101
102
103
104
105
106
107
|
.TH IMPORT 4
.SH NAME
import \- import 9P resources from another system
.SH SYNOPSIS
.B import
[
.B -df
]
[
.B -n
.I ns
]
[
.B -p
.I prog
]
[
.B -s
.I service
]
.I system
.SH DESCRIPTION
.I Import
presents the 9P service
.I service
(default
.BR plumb )
running on
.I system
as a service on the local system,
in the current name space.
.PP
The
.B -n
option sets the remote name space directory
where
.I import
should expect to find
.IR service .
If it is not specified,
.I import
uses name of the local system's name space directory.
(Since name space directories are conventionally inside
.BR /tmp ,
the path have different meanings on the two systems.)
.PP
.I Import
connects to
.I system
using
.IR ssh (1).
It invokes
.I import
on the remote system to carry out the remote
side of the protocol.
The
.B -p
option specifies the path to
.I import
on the remote system, in case it is not in the system search path.
.PP
The
.B -d
option turns on debugging.
The
.B -f
option keeps
.I import
from forking itself into the background, also useful for debugging.
.SH EXAMPLE
Suppose you run
.B sam
.B -r
to the CPU server
.IR anna .
.I Sam
wants to talk to a plumber on the local terminal,
but the file names will refer to files on
.IR anna .
.PP
To fix this problem, create a new name space directory
and start a new plumber on
.IR anna :
.IP
.EX
remotens=/tmp/ns.`whoami`.on.`hostname`
ssh anna mkdir $remotens
ssh anna NAMESPACE=$remotens plumber
.EE
.LP
Now import that plumber to the local name space before starting
.I sam
and
.IR 9term :
.IP
.EX
NAMESPACE=/tmp/ns.anna
mkdir $NAMESPACE
import -n $remotens -s plumb anna
sam &
9term ssh anna &
.EE
.SH SOURCE
.B \*9/src/cmd/import.c
.SH SEE ALSO
.IR 9pserve (4),
.IR intro (4)
|