9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] plumber's namespace?
@ 2001-03-07 16:54 rog
  0 siblings, 0 replies; 5+ messages in thread
From: rog @ 2001-03-07 16:54 UTC (permalink / raw)
  To: 9fans

> type is text
> data matches 'Local (.*)'
> plumb to none
> plumb start rc -c $1

i'd wondered why something like this wasn't already in the plumbing; i
thought that perhaps it was because of security considerations (i.e. it
allows any program which has access to the plumber to get the plumber
to run arbitrary programs, not just those specified in the plumbing
file).

that was also my imagined rationale behind the fact that there's no way
to get a shell script to execute arbitrary "middle button" commands in
acme (which would be very useful sometimes).

anyway, thinking about the above plumbing rule:

another thing you could do would be to have a namespace shared between
the plumber and everything else - e.g. in lib/profile:

	@ {rfork n; srvfs plumbspace /n; plumber}
	mount -b /srv/plumbspace /n

then (for instance) plumbing

	Local cdfs -m /n/cd

would cause the contents of the cd rom to be viewable (and plumbable)
to anywhere on the system.  doesn't work so well for commands that
require some interaction though (like ftpfs) and it's less efficient,
but at least you don't have to execute the mount command twice.

  rog.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] plumber's namespace?
@ 2001-03-08  4:43 okamoto
  0 siblings, 0 replies; 5+ messages in thread
From: okamoto @ 2001-03-08  4:43 UTC (permalink / raw)
  To: 9fans

Thank you very much, Rob and Rog.

>	@ {rfork n; srvfs plumbspace /n; plumber}
>	mount -b /srv/plumbspace /n

I love this way of making plumber's namespace, and it worked very fine here.

I'll bring my Toshiba notebook to Vita Nuova's Training course in Tokyo
(if my physical and mental condition permitts me to do so), and make 
some demonstration of our Plan 9 Japanese environement and this
way of plumbing of some of Planetary images along with listening 
The Beatles's 1 CD by Russ's acd, such of "Eleanor Rigby".  :-)

Kenji



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] plumber's namespace?
@ 2001-03-07 16:16 nemo
  0 siblings, 0 replies; 5+ messages in thread
From: nemo @ 2001-03-07 16:16 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 90 bytes --]

Probably the `isfile' cannot get to the file and fails.
But I'm not a plumber expert.


[-- Attachment #2: Type: message/rfc822, Size: 2151 bytes --]

From: okamoto@granite.cias.osakafu-u.ac.jp
To: plan9@granite.cias.osakafu-u.ac.jp
Subject: [9fans] plumber's namespace?
Date: Wed, 7 Mar 2001 18:53:32 0900
Message-ID: <20010307095404.588F9199EE@mail.cse.psu.edu>


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2.1: Type: text/plain; charset="UTF-8", Size: 785 bytes --]

From: okamoto@granite.cias.osakafu-u.ac.jp
To: plan9@granite.cias.osakafu-u.ac.jp
Subject: [9fans] plumber's namespace?
Date: Wed, 7 Mar 2001 18:53:32 0900
Message-ID: <20010307095404.588F9199EE@mail.cse.psu.edu>

We are facing strange behaviour of plumber.

We added lines into the /sys/lib/plumb/basic file to make plumber recognize 
page -s (page with scrollbars) client as follows:

# NASA image files go to page with scrollbars
type is text
data matches '[a-zA-Z¡-￿0-9_\-./]+'
data matches '([a-zA-Z¡-￿0-9_\-./]+)\.(img|imq)'
arg isfile	$0
plumb to pdsimage
plumb client page -ws $file

Those are added just before jpeg etc. graphic images.   Then, we can dispatch
page -sw command, and see successfully that image, _if_ the image file is
sitting on the disk, say /usr/okamoto/image/m0801499.imq.   However,
it does not recognize the image when we try to read the file from cdrom,
which is mounted after I logged in, say such that 
/n/cdrom/m08014/m0801499.imq.

Kenji

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] plumber's namespace?
@ 2001-03-07 15:04 rob pike
  0 siblings, 0 replies; 5+ messages in thread
From: rob pike @ 2001-03-07 15:04 UTC (permalink / raw)
  To: 9fans

Try adding and using this rule when you want to tell the plumber
about a change to the name space.  RSC dreamed this one up
some time ago but it's not in the paper.

type is text
data matches 'Local (.*)'
plumb to none
plumb start rc -c $1



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [9fans] plumber's namespace?
@ 2001-03-07  9:53 okamoto
  0 siblings, 0 replies; 5+ messages in thread
From: okamoto @ 2001-03-07  9:53 UTC (permalink / raw)
  To: plan9

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 791 bytes --]

We are facing strange behaviour of plumber.

We added lines into the /sys/lib/plumb/basic file to make plumber recognize 
page -s (page with scrollbars) client as follows:

# NASA image files go to page with scrollbars
type is text
data matches '[a-zA-Z¡-￿0-9_\-./]+'
data matches '([a-zA-Z¡-￿0-9_\-./]+)\.(img|imq)'
arg isfile	$0
plumb to pdsimage
plumb client page -ws $file

Those are added just before jpeg etc. graphic images.   Then, we can dispatch
page -sw command, and see successfully that image, _if_ the image file is
sitting on the disk, say /usr/okamoto/image/m0801499.imq.   However,
it does not recognize the image when we try to read the file from cdrom,
which is mounted after I logged in, say such that 
/n/cdrom/m08014/m0801499.imq.

Kenji



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-03-08  4:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-07 16:54 [9fans] plumber's namespace? rog
  -- strict thread matches above, loose matches on Subject: below --
2001-03-08  4:43 okamoto
2001-03-07 16:16 nemo
2001-03-07 15:04 rob pike
2001-03-07  9:53 okamoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).