mars-nwe/doc/PIPE-FS
2011-11-13 00:38:59 +01:00

55 lines
1.8 KiB
Plaintext

The PIPE filesystem arose in answer to the question: how can I save
all or part of a Linux system onto/ via a DOS computer or a Novell
fileserver? The PIPE filesystem was designed as a quick attempt to
solve this problem
In the PIPE filesystem either shell scripts or Linux programs can be
stored. These programs are treated on the client side (eg DOS) like
simple files. Reading or writing these files via the client causes
a popen of the programs.
The server passes as the first parameter either READ
or WRITE, depending on the mode of the corresponding first read or write
operation. This allows the PIPE filesystem to provide a direct
interface between client applications and Linux programs.
The problem stated above could then be solved with the following
simple shell script, which was stored in the PIPE-filesystem:
#!/bin/sh
case "$1" in
'WRITE')
cd /u3 && tar -xf - 2>> /tmp/tar.in
# restore directory /u3/mar
;;
'READ')
cd /u3 && tar -cf - mar 2> /dev/null
# save directory /u3/mar
;;
*)
;;
esac
Under DOS this 'Pipe File' can now be 'copied' into a local file using
the Copy command (->save), or the local file can be copied into this
'Pipe File' (->restore).
A simple print operation can be achieved with the following script:
#!/bin/sh
/usr/bin/lpr
This allows you to print under dos/windows without capturing.
In the examples directory there are two pairs of programs,
comm<->unxcomm und sendm<->unxsendm, that provide further examples
of how to use the PIPE-filesystem.
Using comm/unxcomm it is very easy to invoke simple Linux programs
from the client, e.g. ps, lpq, lprm ..
If anyone has other documented applications of the PIPE-filesystem,
or any suggestions about other ways it might be used, I'd be very glad
to hear from them.
Martin