mars-nwe/doc/PIPE-FS

54 lines
1.7 KiB
Plaintext
Raw Normal View History

2011-11-13 00:38:56 +01:00
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
2011-11-13 00:38:57 +01:00
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
2011-11-13 00:38:56 +01:00
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
2011-11-13 00:38:57 +01:00
/usr/bin/lpr
2011-11-13 00:38:56 +01:00
2011-11-13 00:38:57 +01:00
This allows you to print under dos/windows without capturing.
2011-11-13 00:38:56 +01:00
2011-11-13 00:38:57 +01:00
In the examples dir exist the two programpairs comm<->unxcomm
and sendm<->unxsendm as additional examples for using 'PIPE-filesystem'.
With comm/unxcomm it is very easy to start simple Linux programs
by your client.
for examples: ps, lpq, lprm ...
2011-11-13 00:38:56 +01:00
I would appreciate hearing about further documented applications of
the PIPE filesystem or suggestions for other ways of using it.
Martin