A tutorial and several examples are provided in
/usr/share/examples/mount_portal. The following is an example configuration file.
# @(#)portal.conf 5.1 (Berkeley) 7/13/92
tcp/ tcp tcp/
fs/ file fs/
echo/ rfilter echo/ echo %s
echo_nostrip/ rfilter nostrip echo %s
echo_noslash rfilter echo_noslash echo %s
gzcat/ rfilter gzcat/ gzcat %s
gzip/ wfilter gzip/ gzip > %s
gzip9/ wfilter gzip9/ gzip -9 > %s
ftp/ rfilter ftp/ ftp -Vo - %s
ftp:// rfilter nostrip ftp -Vo - %s
http:// rfilter nostrip ftp -Vo - %s
bzcat/ rfilter bzcat/ bzcat %s
nroff/ rfilter nroff/ nroff -man %s
As is true with many other filesystems, a weird sense of humor is handy.
Notice that after the keynames, like nroff/ and bzcat/, we typically use another slash. In reality, the
mount_portal process changes directory to
/, which makes the subsequent slash unnecessary. However, the extra slash provides a visual hint that we are not operating on an ordinary file. An alternative would be to change the configuration file to something like:
nroff% rfilter nroff% nroff -man
One might then use
less /p/nroff%/usr/share/man/man8/mount_portal.8