home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-02-01 | 56.3 KB | 1,278 lines |
- Newsgroups: comp.sources.unix
- From: sir-alan!ispin!lbartz@iuvax.cs.indiana.edu (Larry Bartz)
- Subject: v25i125: Indianapolis Standard Printer Interface for Networked printers, Part14/15
- Sender: sources-moderator@pa.dec.com
- Approved: vixie@pa.dec.com
-
- Submitted-By: sir-alan!ispin!lbartz@iuvax.cs.indiana.edu (Larry Bartz)
- Posting-Number: Volume 25, Issue 125
- Archive-Name: ispin/part14
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 14 (of 15)."
- # Contents: ISPIN/doc/OLD-DOCS/README.rel_2.0
- # ISPIN/doc/OLD-DOCS/rel_2.0.fixes ISPIN/misc/ISPIT.dr/ISPIT.mail
- # ISPIN/misc/ISPIT.dr/IMPLEMENT ISPIN/misc/SUID.dr/mail.msg
- # ISPIN/misc/wrdprfct.doc
- # Wrapped by socrates@indy6 on Tue Jan 28 15:27:18 1992
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'ISPIN/doc/OLD-DOCS/README.rel_2.0' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ISPIN/doc/OLD-DOCS/README.rel_2.0'\"
- else
- echo shar: Extracting \"'ISPIN/doc/OLD-DOCS/README.rel_2.0'\" \(7661 characters\)
- sed "s/^X//" >'ISPIN/doc/OLD-DOCS/README.rel_2.0' <<'END_OF_FILE'
- X
- X
- X
- X date : August 9, 1990
- X
- X to :
- X
- X from : Systems Administrator, Information Systems Division
- X Indianapolis District Office
- X
- X subject: Indianapolis Standard Printer Interface (for Network printers)
- X ISPIN
- X production release 2.0
- X
- X
- X
- X *** *** *** *** *** *** INTRODUCTION *** *** *** *** *** *** *** ***
- X
- X This is the current version of the production release of ISPIN.
- X The following instructions should be followed by those sites which
- X have not previously installed ISPIN. If you already have ISPIN
- X release 1.1 or 1.2 installed on your system, you should follow the
- X instructions in the file "UPDATEto2.0".
- X
- X Several files in the ISPIN/doc directory document the design, devel-
- X opment, testing, and implementation history of ISPIN.
- X
- X ISPIN has been successfully installed and tested on:
- X
- X AT&T 3B1
- X AT&T 3B2600G
- X CCI 6/32 MP (CCI SysV)
- X Compaq with Intel 80286 CPU
- X (running XENIX)
- X IBM PC/AT with Intel 80386 CPU
- X (running XENIX)
- X Prime EXL 50
- X Pyramid 90x
- X Pyramid 9810
- X Pyramid MIS-4
- X Sequent Balance B8 (DYNIX)
- X Sequent Symmetry (DYNIX)
- X Zilog Model 31
- X Zilog Model 32
- X Zilog Model 130 (Rev J OS)
- X
- X CDN (IRS X.25 network with async interface)
- X Teltone/Tellabs Switch
- X Gandolph Switch
- X David Switch
- X Mitron Switch
- X Equinox Switch
- X Neac Switch
- X
- X
- X Except for conditional compile statements required to resolve the
- X differences between Zeus 3.21's nq/dqueuer and System V's lp and
- X between System V UNIX and DYNIX, the source code is the same for
- X all target environments.
- X
- X *** *** *** *** *** *** THIS TRANSMITTAL *** *** *** *** *** *** ***
- X
- X The tape upon which we have transmitted the application was created
- X in cpio format. cd to a directory in which you want this release to
- X be written, then execute the command:
- X cpio -iudmvc < your_tape_drive
- X
- X The result of this cpio will be the creation of a directory named
- X ISPIN.rel_2.0. ISPIN.rel_2.0 will contain two subdirectories, namely
- X ISPI and ISPIN.
- X
- X
- X
- X *** *** *** *** *** *** ISPI subdirectory *** *** *** *** *** *** ***
- X
- X The ISPI directory contains the freshest version of our ISPI
- X application. ISPI is an application which serves as a FRONTEND
- X for the two queuer/spoolers. The ISPI application is fully self-
- X contained, with its own source code, documentation, etc. We sent
- X ISPI along because we have found it to be an extremely useful tool
- X to support the native queuer/spoolers. If you have any version of
- X ISPI previous to this one, please use this one as a replacement. The
- X ISPI included with this transmittal supersedes the ISPI which
- X accompanied the ISPIN.rel_1.2 release.
- X
- X ISPIN and ISPI are TWO SEPARATE AND DISTINCT APPLICATIONS.
- X
- X Neither depends upon the other for functionality. You may use ISPIN
- X without ISPI. You may use ISPI without ISPIN.
- X
- X
- X
- X *** *** *** *** *** *** ISPIN subdirectory *** *** *** *** *** *** ***
- X
- X ISPIN contains the source code, install documents, and install scripts
- X for the ISPIN application. The ISPIN application serves as a BACKEND
- X for either of two native queuer/spoolers, lp or dqueuer. We have
- X organized the directory ISPIN and its contents into subdirectories
- X using standard names "doc" (for documentation files), "h" (for header
- X files), "install" (where install scripts exist, and from which they
- X must be executed), "obj" (where the executables will be placed as
- X they are compiled), and "src" (where the source code resides).
- X
- X
- X
- X *** *** *** *** *** *** ISPIN documentation *** *** *** *** *** ***
- X
- X The documentation for this application is informal in style, and the
- X code is overflowing with comments. If you don't have time and inclin-
- X ation to read everything in the ISPIN.rel_2.0/ISPIN/doc directory,
- X AT LEAST READ: LPinstall.doc, NQinstall.doc, README.beta.3, design,
- X rel_2.0.fixes, and rtab.
- X
- X
- X
- X
- X *** *** *** *** *** *** ISPIN installation *** *** *** *** *** *** ***
- X
- X If you are installing this application under ZEUS 3.21 and its
- X nq/xq/dqueuer queuer family, install per NQinstall.doc.
- X
- X If you are installing this application under System V UNIX and
- X the lp spooler, install per LPinstall.doc.
- X
- X
- X
- X *** *** *** *** *** *** FEEDBACK, please *** *** *** *** *** *** ***
- X
- X We are maintaining a list of sites to which we have sent ISPI/ISPIN
- X and of contact persons at those sites. Unless you tell us, however,
- X we will have no idea whether or not you actually use these applications
- X in production. Our expectation is that you will, but we will not
- X presume it. Please confirm installation and usage of ISPI/ISPIN. We
- X prefer confirmation via mmdf mail sent to "ispin@indy6", but written
- X confirmation or a phone call will do. Confirmed users of ISPI/ISPIN
- X will receive all subsequent update and informational distributions.
- X We will notify users of updates via a mmdf electronic mail group,
- X "ispinusr@indy6". If possible, we would like your site to have an
- X user included in this mmdf group. An administrative mmdf address which
- X is aliased to an actual user at your end is preferred (i.e.
- X "sysadm@det1" instead of "jdoe@det1"). Please notify us of the mmdf
- X address at which you would like to receive ISPIN information.
- X
- X There is no bug-free software. Although the alpha site and beta site
- X testing has been extensive, we recognize the possibility of bugs which
- X have not yet been exposed. Please report them to us by telephone or by
- X sending mmdf mail to "ispin@indy6". We are committed to supporting this
- X application.
- X
- X If you install and use ISPI/ISPIN on hardware/software platforms which
- X are not listed in this memo, please let us know. This software is
- X intended to be portable, especially among machines which support a
- X System V UNIX environment.
- X
- X If you develop "rtab" entries which you feel others may find useful,
- X contact us. We'd like to be the clearinghouse for such information.
- X We have plans to implement a software distribution facility for
- X users of Indianapolis applications. The establishment of the mmdf
- X group "ispinusr@indy6" is the first step in the implementation of
- X this distribution facility. If you have any questions, please
- X feel free to contact us.
- X
- X
- X
- X
- X Larry Bartz
- X
- X
- END_OF_FILE
- if test 7661 -ne `wc -c <'ISPIN/doc/OLD-DOCS/README.rel_2.0'`; then
- echo shar: \"'ISPIN/doc/OLD-DOCS/README.rel_2.0'\" unpacked with wrong size!
- fi
- # end of 'ISPIN/doc/OLD-DOCS/README.rel_2.0'
- fi
- if test -f 'ISPIN/doc/OLD-DOCS/rel_2.0.fixes' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ISPIN/doc/OLD-DOCS/rel_2.0.fixes'\"
- else
- echo shar: Extracting \"'ISPIN/doc/OLD-DOCS/rel_2.0.fixes'\" \(8356 characters\)
- sed "s/^X//" >'ISPIN/doc/OLD-DOCS/rel_2.0.fixes' <<'END_OF_FILE'
- X
- X
- X ISPIN RELEASE 2.0 CHANGES
- X
- XHere, in no particular order of importance, is a listing of the differences
- Xin ISPIN.rel_2.0
- X
- X
- XLOCK FILES - Take a look at the file ISPIN/doc/design. What I said there
- X about lock files still holds true. Lock files are a relatively
- X arcane and inefficient way for an application to control
- X access to resources. That's why previous releases of ISPIN
- X didn't employ lock files for its own purposes. Neither does
- X this release. The IQUEUER daemon still maintains its own
- X internal control of tty access among competing ISPIN processes.
- X
- X This release, however, implements lock files on top of, or
- X in addition to, IQUEUER's control. The purpose of these lock
- X files is to allow ISPIN to share tty resources with applications
- X such as cu(1), uucp(1), uugetty(M, on some machines), mmdf's
- X deliver, and others. Many of our customers' machines didn't
- X have enough tty ports to permit dedicating some to ISPIN and
- X other tty ports to other datacomm purposes. Hey, the customer
- X is king! You asked for it, you got it. You can get anything
- X you want at Alice's Restaurant (excepting Alice). Blah, blah,
- X blah, etc. (Really, this was a good idea all along. It just
- X took a few of you a while to beat it into my thick head.)
- X
- X ISPIN honors all "foreign" lock files, so if cu(1) or uucp(1)
- X is using the tty, ISPIN won't interfere. If more than one tty
- X is defined for ISPIN's use, ISPIN will move on to the next.
- X If the competitor has tied up the only tty which ISPIN knows,
- X we'll try again the next time the IQUEUER daemon loops around.
- X
- X The lock files ISPIN creates are intended to be unassailable
- X by competing "foreigners". Analysis and development of this
- X feature included a study of the lock file implementation on
- X five different UNIX hardware/software platforms. Guess what.
- X I saw five different lock file strategies. So much for any
- X attempt at compliance with the native schemes. We could have
- X complied with all five via liberal use of conditionally
- X compiled code, but what if a customer wants to run ISPIN on
- X a hardware/software combo which implements a sixth different
- X scheme? Can you say bye-bye to portability? I couldn't.
- X
- X ISPIN's lock files are implemented as directory files with
- X no contents and "zero" permissions all around. Alpha and
- X beta site testing has proven that this approach is universally
- X compatible with competing processes. This method is an
- X inelegant "brute force" technique, but it works. When we
- X all have POSIX-compliant boxes which implement a truly
- X universal lock file scheme, I'll do it the POSIX way. Until
- X then, we'll use the big hammer.
- X
- X
- XLP's "-m" - Here's the scenario: a user requests several files to be
- X printed via one lp(1) command, like so:
- X
- X lp -ddest -m file1 file2 file3 dir1/dir2/file4 file5
- X
- X Now suppose that dir2's permissions were such that the user
- X "lp" could not get in there to read file4. If the user "lp"
- X can't read it, lp(1) can't print it. Since the user specified
- X the "-m" flag, he should receive mail from lp, reporting
- X that the print request failed.
- X
- X Under previous releases of ISPIN, user never got the message.
- X Now he will.
- X
- X
- XISPIN's log - All of ISPIN's log messages now show which tty was in use at
- X the time the log message was written. There are some phases in
- X the life of an ISPIN process in which the tty is undefined. If
- X the log message is written at such a point, there will be no
- X entry for "DEVICE".
- X
- X
- XRTAB flags - Two new flags for your rtab entries to further control the
- X behavior of the ISPIN process:
- X
- X -R
- X This flag takes no argument. If the -R flag is present, the tty through
- X which ISPIN communicates will be set so that it DOES NOT transmit the
- X "newline" (ascii "LF", or octal \012) as the newline/carriage return pair.
- X Note that the LF/LF-CR conversion is the default condition if -R is not
- X present. For most printers, DO NOT USE THIS FLAG. This flag is included
- X specifically for supporting the transmission of binary information (such
- X as would be the case with raster graphics).
- X
- X -T
- X This flag takes no argument. If the -T flag is present, tabs will be
- X expanded to spaces on output. If -R flag is present, -T has no effect.
- X
- X
- XIQ output - The utility iq (iqueuer status enquirer) is modified in some
- X subtle ways:
- X
- X TIME-IN - This column reflects the time the native spooler/
- X queuer first invoked the ISPIN process.
- X
- X STATE-TIME - This column relects the time the ISPIN process
- X entered its current "STATE", or phase of execution.
- X
- X STATE - As before, this column shows the current phase of
- X the ISPIN process. A new state has been defined
- X and will be displayed when appropriate.
- X The state "QUITTING" will be displayed whenever
- X the ispin is in the process of an abnormal
- X termination. The state "DISCONNECTING" will be
- X displayed during normal termination and loop cycles.
- X
- X
- XISPI mods - As we've said many times before, ISPI is a companion application
- X to ISPIN. ISPI serves as a front-end menu for the native system's
- X spooler/queuer. ISPIN will work without ISPI, and vice versa.
- X Each, however, complements the native spooler/queuer, and the
- X trio (ISPI, native spooler/queuer, ISPIN) makes for a very
- X efficient and effective package.
- X
- X This latest release of ISPI incorporates yet another customer-
- X driven feature. Here is an excerpt form the latest ISPI.DOC:
- X
- X
- X As of 08/07/90 revision and later, the user may also set an environ-
- X mental variable, CONFIGDIR. The value of this variable will override the
- X compile-time-defined CONFIG_PATH. The purpose of CONFIGDIR is to allow
- X the Systems Administrator to set up various printer selection menus for
- X various groups of users. This may be necessary for reasons of: security (so
- X users of sensitive data may not inadvertently send jobs to insecure
- X printers [aren't they all?]); convenience (so users don't have to wade
- X through a menu filled with printers they never use); and practicality (only
- X so many printers will fit on one screen display page).
- X
- X Like so:
- X in C-shell:
- X set configdir=/z/bin/config/ex_configdir
- X setenv CONFIGDIR /z/bin/config/ex_configdir
- X
- X in Bourne shell:
- X CONFIGDIR=/z/bin/config/ex_configdir
- X EXPORT CONFIGDIR
- X
- X
- X
- X
- X
- X
- X/******************************************************************************/
- XWell, that's the story on ISPIN.rel_2.0. I think the above-listed enhancements
- Xand fixes are sufficiently significant to warrant the minimal time you will
- Xspend upgrading from previous releases. If you haven't yet implemented ISPIN,
- Xthis release is what you've been waiting for.
- X
- XWith a lot of good customer involvement and a few extra keystrokes, we've made
- Xa good application even better.
- X
- X08/08/90
- X
- X Internal Revenue Service
- X Indianapolis District Office
- X Information Systems Division
- X Operations Branch
- X
- X Larry Bartz
- END_OF_FILE
- if test 8356 -ne `wc -c <'ISPIN/doc/OLD-DOCS/rel_2.0.fixes'`; then
- echo shar: \"'ISPIN/doc/OLD-DOCS/rel_2.0.fixes'\" unpacked with wrong size!
- fi
- # end of 'ISPIN/doc/OLD-DOCS/rel_2.0.fixes'
- fi
- if test -f 'ISPIN/misc/ISPIT.dr/ISPIT.mail' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ISPIN/misc/ISPIT.dr/ISPIT.mail'\"
- else
- echo shar: Extracting \"'ISPIN/misc/ISPIT.dr/ISPIT.mail'\" \(19020 characters\)
- sed "s/^X//" >'ISPIN/misc/ISPIT.dr/ISPIT.mail' <<'END_OF_FILE'
- X
- XHave you seen the television commercial which says "Orange juice: It's not
- Xjust for breakfast anymore." ?
- X
- XTry this one. "ISPIN: It's not just for printing anymore."
- X
- XReally. Just as lp/lpsched is effectively a general purpose FIFO job scheduler,
- Xwhen you get right down to it, ISPIN is really a general purpose data transfer
- Xmechanism. It's just that up to now, we've only used it to transfer data to
- Xprinters.
- X
- XWhy couldn't we use ISPIN to transfer data to other systems or other media?
- X
- XWell, we can. I have. You can, too. Whether you want to (or not) is up
- Xto you. I'm not pushing this as any kind of world beater.
- X
- XThis message contains documentation, scripts, and programs to implement
- XIndianapolis Simple Protocol for Inter-system Transfers (ISPIT). ISPIT is
- Xa means of transferring data via the lp/ISPIN mechanism. ISPIT does not
- Xrequire modification to existing ISPIN code.
- X
- XI developed ISPIT for a particular purpose. The AT&T 3B1 which sits on my
- Xdesk has a 68MB hard disk but no decent magnetic media for backups. The
- Xcatridge tape drive is no longer in production, and putting that much data
- Xon floppies is beyond the scope of my patience. I wanted an automated full
- Xsystem backup, but I had no local hardware to do it.
- X
- XI tried several approaches via uucp but got no satisfactory result. Two
- Ximmutable factors of uucp data transfer got in my way.
- X
- XFirst is spooling. The uucico process on the receiving machine builds the
- Xincoming data in a temporary file in the spooling directory of your choice,
- Xthen copies that temporary file to the destination file you specify. The
- Xreceiving box must have ample disk capacity. Even if I specified the nine
- Xtrack drive on the receiving machine as the destination file (it works, by
- Xthe way), 35-40MB of free disk is pretty hard to come by on one of our
- Xproduction machines. (I'm sending my entire system as one cpio archive file
- Xwhich is compressed, then piped through a FIFO. I tried queueing up each
- Xseparate file, resulting in a mess of epic proportions).
- X
- XThe second limiting factor of uucp was the speed (lack thereof) of the
- Xuucp "G" protocol. My testing has shown that, in terms of raw throughput,
- XISPIT transfers data from system to system at twice the rate of uucp "G",
- X100% faster.
- X
- XI'll also cite a figure I'll call "virtual throughput", or apparent
- Xthroughput. If you compress a file, uucp it to another system, then
- Xuncompress it on receipt, you've attained a faster file transfer. The com-
- Xpressed data is "data", so must travel through media (CDN, Tellabs, etc)
- Xwhich does not interpret software flow control. Fine for uucp.
- X
- XISPIN/ISPIT depends upon accurate software flow control, so compressed
- Xdata must be converted to printable ascii before transmission. See the
- Xdo_ispit.sh script, below. The btoa (binary to ascii) process expands input
- Xdata by roughly 30% on output.
- X
- XEven with this "handicap", ISPIT's virtual throughput is 70% faster than
- Xuucp "G".
- X
- XWhat of error checking, you say? Uucp "G" protocol may be slow, but at least
- Xit checks to make sure the data gets from end to end in one piece.
- X
- XI haven't noticed ISPIN dropping a lot of characters, even on big print jobs.
- XThere certainly isn't any error checking going on there. ISPIT's success
- X(if it has any) is heavily dependent on fast, modern I/O subsystems at
- Xboth ends (no Model 31 Zilogs, please), and a clean transport media which
- Xsupports a reliable cascading buffered software flow control (CDN, Tellabs,
- Xmaybe others).
- X
- X
- X(DISCLAIMER)
- XPlease don't get me wrong. I'm not proposing that we use this method as a
- Xreplacement for other valid data transfer mechanisms such as uucp, kermit,
- Xand others. But sometimes those others can't do what we need to do. Maybe
- Xthere are a few niches where ISPIT might fit.
- X
- XBelow is the output from "more * > ISPIT.doc" from within a directory which
- Xcontains all files necessary to implement ISPIT.
- X
- X::::::::::::::
- XIMPLEMENT
- X::::::::::::::
- XISPIT (Indianapolis Simple Protocol for Inter-system Transfers)
- X
- XIMPLEMENTATION NOTES
- X
- X
- XDON'T BOTHER IMPLEMENTING THIS ON 16-BIT MACHINES SUCH AS ZILOG MODEL 31 (or
- Xeven the so-called "32-bit Upgrade"). Their I/O systems are not adequate for
- Xthe reliable data flow ISPIT requires.
- X
- XOn dual universe machines, do everything from att universe.
- X
- XAlso, if any of the machines you use in this scenario do not support the
- Xcompress/uncompress/btoa/atob/zcat family of executables, you'll need 'em.
- XThe Pyramids and Sequents have these in the ucb universe. "Pure" System V's
- Xlike the AT&T boxes and Zilog 130's don't. I have source code which compiles
- Xand executes fine on our Zilog 130 and my AT&T 3B1. If you want it, ask me.
- X
- X
- XSOURCE MACHINE:
- X
- X First, the source machine must have ISPIN.rel_2.1 or later.
- X
- X do_ispit.sh - check this script for correct pathnames to
- X your executables such as compress, btoa,
- X cpio, and lp. On dual universe machines, the
- X Berzerkely commands will have to be preceded
- X by "ucb".
- X
- X - Put a copy of this script in a directory which
- X is in your path, renaming it as "ispit", such
- X as:
- X cp do_ispit.sh /usr/local/bin/ispit
- X
- X or
- X
- X cp do_ispit.sh /z/bin/ispit
- X
- X rtab.entry - Edit this rtab entry to make it valid for your
- X situation. You'll have to change:
- X
- X - the first field, for queue member name.
- X I suggest the node name of the destination
- X system.
- X
- X - the second field, the device(s). Use the
- X same one(s) as you do for ISPIN printing.
- X
- X - the connect chat fields. If you're going
- X straight through CDN to the remote system,
- X you'll only have to change the address.
- X If negotiating other switches, adjust
- X accordingly.
- X
- X Unlike uucp, ISPIT REQUIRES XON/XOFF
- X FLOW CONTROL! So make sure all the
- X network links you go through support it.
- X From the source machine, go out via ports
- X you use for printing. Log into the destina-
- X tion box through channels just like a
- X user (person). Don't use "no flow" uucp
- X file transfer channels.
- X
- X - Notice that this rtab entry results in a
- X user named "ispit" logging onto the remote
- X machine with password of "notvalid". Change
- X these to correspond with what you set up
- X on the destination system.
- X
- X - The rest of the rtab entry, including
- X "FILE?", "OK", etc MUST STAY AS IS! It
- X talks to the ispit.sh script on the dest-
- X ination box.
- X
- X - Add the rtab entry to your rtab file.
- X
- X lpadmin stuff - Add a queue member whose name matches the
- X first field of the rtab entry, using the
- X special new ispit interface script included
- X here. Such as:
- X
- X lpshut
- X
- X lpadmin -pINDY_5 -v/dev/null -iinterface
- X
- X accept INDY_5
- X
- X enable INDY_5
- X
- X lpsched
- X
- X
- X
- XDESTINATION MACHINE:
- X
- X Add a user to the system. Use the passwd.entry file included
- X here as a model. This user's logname and password must match
- X corresponding fields in the rtab entry you set up on the
- X source machine.
- X
- X Compile the program "eot_trap" from the source I've provided.
- X
- X cc -o eot_trap eot_trap.c
- X
- X Put the executable "eot_trap" and the script "ispit.sh" in
- X the new user's home directory. Make they are executable by
- X the new user.
- X
- X Test this new user by logging as him (OK, Kim, as her).
- X ispit.sh will prompt you for a file name. Give a name and
- X a carriage return. Type anything you want, ending with a
- X <ctrl>d. When you log in again as yourself, the file you
- X specified should consist of all you typed.
- X
- X
- XUSAGE:
- X
- X The script do_ispit.sh contains some internal documentation
- X on its usage.
- X
- X If you transfer data via the do_ispit.sh (or "ispit") script,
- X the file on the destination machine will be named as you
- X specify. The file's format is as a cpio archive which is
- X compressed, then converted by btoa. To disassemble this mess
- X on the destination machine, you can:
- X
- X cat filename|atob|zcat|cpio -iudmcv
- X
- X on a dual universe box, from att universe:
- X cat filename|ucb atob|ucb zcat|cpio -iudmcv
- X
- XAPPLICATION:
- X
- X I've even had good luck specifying the nine track drive as
- X the destination device (Zilog 130, not Sequent B8). Here's
- X how I send the entire contents of my AT&T 3B1's 68MB hard
- X drive (approx 64% full) to a nine track tape on a Zilog
- X Model 130 named INDY_5:
- X
- X #!/bin/sh
- X cd /
- X /usr/local/bin/ispit . /dev/rmiop0 INDY_5
- X
- X When I want to check the correctness of my backup tape,
- X I login to INDY_5, mount my tape, and:
- X
- X cat /dev/rmiop0|atob|zcat|cpio -itcv > tape.list
- X
- X You could easily modify the ispit.sh script on the destina-
- X tion machine so that eot_trap sends its output through atob,
- X and zcat, and then to the specified output file. Then you'd
- X be dealing with a simple cpio archive at the destination.
- X
- X Come to think of it, you could modify any of this to do
- X anything you might dream up!
- X::::::::::::::
- XREADME
- X::::::::::::::
- X
- Xrtab.entry - see do_ispit.sh. Notice that this rtab entry requires that
- X this queue member be called by an lp(1) command which
- X must include a sane value for the "-o" flag.
- X The arg to the "-o" is used by ISPIN at the point in the
- X rtab where "\U" appears.
- X Note also the use of the "-R" flag for really raw output.
- X
- Xdo_ispit.sh - the shell script which is executed by the source system.
- X
- X The lp command line contains some interesting features.
- X
- X The string passed as the argument to the "-o" flag is
- X actually made up of two arguments which are delimited by
- X the "@" symbol. These two arguments are processed by
- X the special interface script on the source system.
- X
- X The first "argument" to lp's "-o" flag is processed
- X by ispin and inserted in a "sent" network negotiation
- X string where a "\U" appears. On the destination system,
- X ispit.sh picks this up as the name of the output file.
- X
- X Also notice that the second "argument" to the "-o" flag
- X is /tmp/$nowfile. This file is a named pipe, created "on
- X the fly". The lp/interface file (special for this purpose)
- X reads from the named pipe which was created and filled by
- X do_ispit.sh.
- X
- X The "filename" argument to the lp command is /etc/passwd.
- X This file is not actually transmitted by the ispit/ispin
- X process. We use /etc/passwd as a placeholder on the
- X command line since lp will not queue a request without a
- X valid non-null filename.
- X
- X do_ispit.sh requires three arguments:
- X
- X - First is the name of the source file to be transferred.
- X
- X - Second is the destination file name on the destination
- X system. This argument should be a full path name. All
- X elements of the path must exist. The destination directory
- X must be writable by the user "ispit" on the remote system.
- X If this argument is less than a fully qualified path, the
- X remote system will interpret the argument relative to
- X ispit's home directory.
- X
- X - Third is the (lp) queue member which will process the
- X request.
- X
- X On dual universe machines, the calls to "compress", "btoa",
- X "cut", and "lp" may have to be preceded by the appropriate
- X universe call. Path names to commands may also require
- X adjustment.
- X
- Xinterface - This shell script is the lp interface file for ispit on
- X the source system.
- X
- Xeot_trap.c * - source for a filter program which watches for an ascii
- X "EOT" character. eot_trap filters the input
- X on the receiving system. The source system's rtab entry
- X for the "ispit" queue member sends EOT as the first action
- X of the ispin quit sequence. eot_trap exits, ending the
- X login session, so ispit exits. This dependence upon
- X EOT makes it IMPERATIVE that all output be converted by
- X btoa(1). See do_ispit.sh.
- X
- Xispit.sh * - see passwd.entry, below. This is the script which is invoked
- X upon login by and for the ispit user. Notice that ispit.sh
- X expects (actually requires) that a variable
- X "OF" is assigned a sane value. This value is passed at login
- X time by the user "ispit". See rtab.entry for the "\U".
- X
- X NOTE: ispit.sh calls the executable "eot_trap", assuming
- X that the executable is located in ispit's home
- X directory.
- X
- Xpasswd.entry * - this is the /etc/passwd entry for the ispit user on the
- X destination machine. The last field of the entry is the full
- X path name of the ispit.sh script. Change the location of
- X ispit's home directory as you see fit.
- X
- X
- X
- X * - denotes this file, data, or program exists on the
- X destination machine. All else exists on the source
- X machine.
- X::::::::::::::
- Xdo_ispit.sh
- X::::::::::::::
- X#!/bin/sh
- X# do_ispit.sh 08/07/91 LSB
- X# When you install this in an accessible path, call it "ispit". This will
- X# assure compatibility with possible future executables.
- X# requires three args:
- X# $1 is file to be xferred: could be a directory, could be more than one
- X# file if all enclosed in double quote
- X#
- X# $2 is destination file name (full path on remote system, or relative to
- X# ispit's home directory on the remote system)
- X#
- X# $3 is the lp queue member to use (for destination system)
- X#
- X# so:
- X# ispit source_file destination_file destination_system_queue_member
- X#
- X# examples:
- X#
- X# send testfile to /tmp/testfile on queue indy6:
- X# ispit testfile /tmp/testfile indy6
- X#
- X# send directory UUGETTY and all contents to /tmp/UUG.cp.Z.a on queue indy6:
- X# ispit UUGETTY /tmp/UUG.cp.Z.a indy6
- X#
- X# send all files whose names contain "ind" to /tmp/ind.cp.Z.a on queue indy6:
- X# ispit "`ls *ind*`" /tmp/ind.cp.Z.a indy6
- X#
- X# nowfile (not an argument) is the name of the named pipe in /tmp we'll use
- X#
- X#
- Xnowfile=`/bin/date +%m%d%y`.`/bin/date +%H%M%S`
- Xecho "ISPIT REQUEST" >> /tmp/ispit.log
- Xdate >> /tmp/ispit.log
- Xecho " user: "`id` >> /tmp/ispit.log
- Xecho " source: "$1 >> /tmp/ispit.log
- Xecho " destination: "$2 >> /tmp/ispit.log
- Xecho " queue: "$3 >> /tmp/ispit.log
- Xecho " pipe: /tmp/"$nowfile >> /tmp/ispit.log
- X/bin/rm -f /tmp/$nowfile
- X/etc/mknod /tmp/$nowfile p
- X/bin/chmod 666 /tmp/$nowfile
- Xfind $1 ! -type p -print|/bin/cpio -oc|/usr/local/bin/compress|/usr/local/bin/btoa > /tmp/$nowfile &
- X/usr/bin/lp -d$3 -o$2@/tmp/$nowfile /etc/passwd
- X# Yes, I do mean /etc/passwd! It's here as a necessary argument to fool lp.
- X::::::::::::::
- Xeot_trap.c
- X::::::::::::::
- X#include <stdio.h>
- X
- Xmain()
- X{
- X int c;
- X
- X while ((c = getc(stdin)) != EOF)
- X {
- X if(c == 4)
- X {
- X exit(0);
- X }
- X
- X putc(c,stdout);
- X }
- X}
- X::::::::::::::
- Xinterface
- X::::::::::::::
- X#!/bin/sh
- X# 08/07/91 LSB
- X# This interface script usable for ISPIT file transfer protocol
- Xecho "ISPIT FILE TRANSFER" >> /tmp/ispit.log
- Xdate >> /tmp/ispit.log
- Xecho " lp job id : "$1 >> /tmp/ispit.log
- Xecho "requesting user : "$2 >> /tmp/ispit.log
- Xecho " destination : "`echo $5|/usr/bin/cut -d@ -f1` >> /tmp/ispit.log
- Xecho " pipe : "`echo $5|/usr/bin/cut -d@ -f2` >> /tmp/ispit.log
- Xexec /usr/spool/lp/ISPIN/ispin `/bin/basename $0|/usr/bin/tr -d "[\012*]"` $1 $2 "" 1 `echo $5|/usr/bin/cut -d@ -f1` `echo $5|/usr/bin/cut -d@ -f2`
- X::::::::::::::
- Xispit.sh
- X::::::::::::::
- X#!/bin/sh
- X# ispit.sh 080791 LSB
- X# written to run as the user ispit's default shell (last field in passwd entry)
- X# stty call is of "att" type, so must be run under att on dual universe boxes
- Xecho "OUTPUT_FILE?"
- Xread OF
- Xecho "OK"
- Xstty raw ixoff -echo hupcl brkint
- Xecho "ISPIT START" >> ispit.log
- Xdate >> ispit.log
- Xecho $OF >> ispit.log
- X./eot_trap > $OF
- Xdate >> ispit.log
- Xstty sane
- Xexit
- X::::::::::::::
- Xpasswd.entry
- X::::::::::::::
- Xispit:9CKY7K.On.kVs:437:4::/zb/ispit:/zb/ispit/ispit.sh
- X::::::::::::::
- Xrtab.entry
- X::::::::::::::
- X# This rtab entry is usable only for the ISPIT file transfer protocol.
- XINDY_5;/dev/tty000;19200;-L;-R;-Bcongestion;-Bremote dte;-Q\004\L\L\K\dclr\r\d;-DConnection cleared;-Dad>:;-Dogin:;ad>-\p\K\pclr\r\d\020\pclr\r\d-ad>;clr\r\r\d;ad>-\p\K\pclr\r\d\020\pclr\r\d-ad>;set recall=none\r\pset break-handling=send-break+recall\r\pset pad-flow=on\r\pset terminal-flow=on\r\p;ad>-\r\r\d-ad>;\pconnect\s00000099999999\r\d;Opened;\r\r\d;ogin:-\r\d-ogin:;ispit\r\d;assword:;notvalid\r\d\d;FILE?;\U\r\d\d;OK;\w;;;
- X#ispit to INDY_5
- X#
- END_OF_FILE
- if test 19020 -ne `wc -c <'ISPIN/misc/ISPIT.dr/ISPIT.mail'`; then
- echo shar: \"'ISPIN/misc/ISPIT.dr/ISPIT.mail'\" unpacked with wrong size!
- fi
- # end of 'ISPIN/misc/ISPIT.dr/ISPIT.mail'
- fi
- if test -f 'ISPIN/misc/ISPIT.dr/IMPLEMENT' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ISPIN/misc/ISPIT.dr/IMPLEMENT'\"
- else
- echo shar: Extracting \"'ISPIN/misc/ISPIT.dr/IMPLEMENT'\" \(6949 characters\)
- sed "s/^X//" >'ISPIN/misc/ISPIT.dr/IMPLEMENT' <<'END_OF_FILE'
- XISPIT (Indianapolis Simple Protocol for Inter-system Transfers)
- X
- XIMPLEMENTATION NOTES
- X
- X
- XDON'T BOTHER IMPLEMENTING THIS ON 16-BIT MACHINES SUCH AS ZILOG MODEL 31 (or
- Xeven the so-called "32-bit Upgrade"). Their I/O systems are not adequate for
- Xthe reliable data flow ISPIT requires.
- X
- XOn dual universe machines, do everything from att universe.
- X
- XAlso, if any of the machines you use in this scenario do not support the
- Xcompress/uncompress/btoa/atob/zcat family of executables, you'll need 'em.
- XThe Pyramids and Sequents have these in the ucb universe. "Pure" System V's
- Xlike the AT&T boxes and Zilog 130's don't. I have source code which compiles
- Xand executes fine on our Zilog 130 and my AT&T 3B1. If you want it, ask me.
- X
- X
- XSOURCE MACHINE:
- X
- X First, the source machine must have ISPIN.rel_2.1 or later.
- X
- X do_ispit.sh - check this script for correct pathnames to
- X your executables such as compress, btoa,
- X cpio, and lp. On dual universe machines, the
- X Berzerkely commands will have to be preceded
- X by "ucb".
- X
- X - Put a copy of this script in a directory which
- X is in your path, renaming it as "ispit", such
- X as:
- X cp do_ispit.sh /usr/local/bin/ispit
- X
- X or
- X
- X cp do_ispit.sh /z/bin/ispit
- X
- X rtab.entry - Edit this rtab entry to make it valid for your
- X situation. You'll have to change:
- X
- X - the first field, for queue member name.
- X I suggest the node name of the destination
- X system.
- X
- X - the second field, the device(s). Use the
- X same one(s) as you do for ISPIN printing.
- X
- X - the connect chat fields. If you're going
- X straight through CDN to the remote system,
- X you'll only have to change the address.
- X If negotiating other switches, adjust
- X accordingly.
- X
- X Unlike uucp, ISPIT REQUIRES XON/XOFF
- X FLOW CONTROL! So make sure all the
- X network links you go through support it.
- X From the source machine, go out via ports
- X you use for printing. Log into the destina-
- X tion box through channels just like a
- X user (person). Don't use "no flow" uucp
- X file transfer channels.
- X
- X - Notice that this rtab entry results in a
- X user named "ispit" logging onto the remote
- X machine with password of "notvalid". Change
- X these to correspond with what you set up
- X on the destination system.
- X
- X - The rest of the rtab entry, including
- X "FILE?", "OK", etc MUST STAY AS IS! It
- X talks to the ispit.sh script on the dest-
- X ination box.
- X
- X - Add the rtab entry to your rtab file.
- X
- X lpadmin stuff - Add a queue member whose name matches the
- X first field of the rtab entry, using the
- X special new ispit interface script included
- X here. Such as:
- X
- X lpshut
- X
- X lpadmin -pINDY_5 -v/dev/null -iinterface
- X
- X accept INDY_5
- X
- X enable INDY_5
- X
- X lpsched
- X
- X
- X
- XDESTINATION MACHINE:
- X
- X Add a user to the system. Use the passwd.entry file included
- X here as a model. This user's logname and password must match
- X corresponding fields in the rtab entry you set up on the
- X source machine.
- X
- X Compile the program "eot_trap" from the source I've provided.
- X
- X cc -o eot_trap eot_trap.c
- X
- X Put the executable "eot_trap" and the script "ispit.sh" in
- X the new user's home directory. Make they are executable by
- X the new user.
- X
- X Test this new user by logging as him (OK, Kim, as her).
- X ispit.sh will prompt you for a file name. Give a name and
- X a carriage return. Type anything you want, ending with a
- X <ctrl>d. When you log in again as yourself, the file you
- X specified should consist of all you typed.
- X
- X
- XUSAGE:
- X
- X The script do_ispit.sh contains some internal documentation
- X on its usage.
- X
- X If you transfer data via the do_ispit.sh (or "ispit") script,
- X the file on the destination machine will be named as you
- X specify. The file's format is as a cpio archive which is
- X compressed, then converted by btoa. To disassemble this mess
- X on the destination machine, you can:
- X
- X cat filename|atob|zcat|cpio -iudmcv
- X
- X on a dual universe box, from att universe:
- X cat filename|ucb atob|ucb zcat|cpio -iudmcv
- X
- XAPPLICATION:
- X
- X I've even had good luck specifying the nine track drive as
- X the destination device (Zilog 130, not Sequent B8). Here's
- X how I send the entire contents of my AT&T 3B1's 68MB hard
- X drive (approx 64% full) to a nine track tape on a Zilog
- X Model 130 named INDY_5:
- X
- X #!/bin/sh
- X cd /
- X /usr/local/bin/ispit . /dev/rmiop0 INDY_5
- X
- X When I want to check the correctness of my backup tape,
- X I login to INDY_5, mount my tape, and:
- X
- X cat /dev/rmiop0|atob|zcat|cpio -itcv > tape.list
- X
- X You could easily modify the ispit.sh script on the destina-
- X tion machine so that eot_trap sends its output through atob,
- X and zcat, and then to the specified output file. Then you'd
- X be dealing with a simple cpio archive at the destination.
- X
- X Come to think of it, you could modify any of this to do
- X anything you might dream up!
- END_OF_FILE
- if test 6949 -ne `wc -c <'ISPIN/misc/ISPIT.dr/IMPLEMENT'`; then
- echo shar: \"'ISPIN/misc/ISPIT.dr/IMPLEMENT'\" unpacked with wrong size!
- fi
- # end of 'ISPIN/misc/ISPIT.dr/IMPLEMENT'
- fi
- if test -f 'ISPIN/misc/SUID.dr/mail.msg' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ISPIN/misc/SUID.dr/mail.msg'\"
- else
- echo shar: Extracting \"'ISPIN/misc/SUID.dr/mail.msg'\" \(5839 characters\)
- sed "s/^X//" >'ISPIN/misc/SUID.dr/mail.msg' <<'END_OF_FILE'
- XThe UNIX System V, release 2 lp subsystem incorporates a peculiar security
- Xmechanism. Unless the administrative user "lp" can read a file, it cannot
- Xbe printed. This effectively requires that any file which is to be printed
- Xmust have read permissions for the world.
- X
- XFor many sites/users/systems administrators this is an unacceptable situation.
- XFiles and directories are created with restrictive permissions for valid
- Xsecurity reasons. Even temporarily opening perms on a file to permit printing
- Xrepresents a potential security breach.
- X
- XIn 1987, Centel's Perry Mathis devised a Bourne shell script called "lpc".
- XIt was designed to be run in place of /usr/bin/lp (after the "real" lp had
- Xbeen moved to another name). lpc allowed any file the calling user could
- Xread to be printed (by catting the file to a pipe to the "real" lp command).
- X
- XMany sites use the lpc script and find it acceptable. It has a side-effect
- Xwhich many find unacceptable. When the "real" lp is asked to print the
- Xstandard input (from the "cat" command), lp MUST make a temporary copy of
- Xthe input so that it can be printed when lpsched allows. This copy is created
- Xin the /usr/spool/lp/request/printername directory. This process eats cpu
- Xand disk access time. Even worse, if the file(s) is(are) REALLY BIG, the
- Xcopying activity can run the /usr filesystem down to zero free blocks!
- X
- XCatch-22.
- X
- XUntil now.
- X
- XI've recently had the pleasure of working with a box which runs
- XUNIX SysV release 3. The lp subsystem under release 3 employs a more logical,
- Xmore flexible security approach. Under Sys V release 3, the daemon process
- Xlpsched runs as setuid to root. Depending upon the particular flavor of
- XSysVrel3, some of the other related process also run as superuser. At the
- Xend of the print request/spooling/scheduling/printing process, the program
- Xwhich actually reads and prints the file is executed under the identity
- Xof the user who requested the job.
- X
- XThe net effect is that the user is allowed to print any file which they
- Xcan read, but no extra disk copy need be created. This flexibility is
- Xenabled while still retaining the security of not allowing users to print
- Xfiles which they cannot read.
- X
- XI've devised a means by which you can make your System V release 2 lp
- Xsubsystem emulate release 3's behavior. Two files are attached below.
- X
- XFirst is a Bourne shell script which changes lp's uid to 0 and sets correct
- Xfile permissions on all lp subsystem executables.
- X
- XSecond is a code fragment with which you can patch your
- XISPIN.rel_2.1/ISPIN/src/ISPIN.c. This patch is good only for a 2.1 ISPIN!
- X
- XDO NOT USE THE FIRST WITHOUT THE SECOND! If you do, you'll totally subvert
- Xall security relative to printing.
- X
- X--- cut here --- cut here --- cut here --- cut here --- cut here --- cut here
- X#!/bin/sh
- X# lp_perms.sh 05/13/91 LSB IRS Indianapolis
- X#
- X# This routine sets up a System V, release 2 lp subsystem to behave
- X# similar to a System V, release 3 lp subsystem with respect to file
- X# access. It all runs as setuid to superuser. Under this setup, it
- X# is CRITICALLY IMPORTANT to have an interface program which will
- X# setgid and setuid back to the user who requested the job, thus
- X# maintaining security.
- X#
- X# After you run this routine, MAKE SURE that the user "lp" does have
- X# a password which is unknown to all. Anyone who logs on as lp will
- X# be superuser.
- X#
- X# After implementation of this routine and the setgid/setuid interface,
- X# users will be able to print any file which they themselves can read.
- X#
- X# This is the code fragment for ispin which does the trick:
- X# #ifdef LP
- X# /* If this process is running as setuid to root (uid == 0),
- X# then setuid to the requesting user. 05/09/91 LSB */
- X# if(geteuid() == 0)
- X# {
- X# setgid(pass->pw_gid);
- X# setuid(pass->pw_uid);
- X# }
- X# #endif
- X# ISPIN.rel_2.1/src/ISPIN.c can be patched with this code fragment after line
- X# 1269. All ISPIN releases after ISPIN.rel_2.1 will contain this code.
- X#
- X# change lp's uid to 0
- Xset UID
- Xset LYNE
- XUID=`grep lp\: /etc/passwd|cut -d\: -f3`
- XLYNE=`grep -n lp\: /etc/passwd|cut -d\: -f1`
- Xsed $LYNE\ s/\:$UID\:/\:0\:/g /etc/passwd > /tmp/passwd.TMP
- Xcp /etc/passwd /tmp/passwd.sav
- Xcp /tmp/passwd.TMP /etc/passwd
- X#
- X# lp administrative stuff, superuser only
- Xchown lp /usr/lib/lpsched
- Xchmod 700 /usr/lib/lpsched
- Xchown lp /usr/lib/lpshut
- Xchmod 700 /usr/lib/lpshut
- Xchown lp /usr/lib/lpmove
- Xchmod 700 /usr/lib/lpmove
- Xchown lp /usr/lib/accept
- Xchmod 700 /usr/lib/accept
- Xchown lp /usr/lib/reject
- Xchmod 700 /usr/lib/reject
- X#
- X# lp user stuff
- Xchown lp /usr/bin/lp
- Xchmod 4711 /usr/bin/lp
- Xchown lp /usr/bin/lpstat
- Xchmod 4711 /usr/bin/lpstat
- Xchown lp /usr/bin/cancel
- X# The following lets any user cancel any job, same as before.
- X# If you don't like that, change 4711 to 700. Then only superuser can cancel.
- X# Same goes for enable and disable.
- Xchmod 4711 /usr/bin/cancel
- Xchown lp /usr/bin/enable
- Xchmod 4711 /usr/bin/enable
- Xchown lp /usr/bin/disable
- Xchmod 4711 /usr/bin/disable
- X# end of lp_perms.sh
- X--- cut here --- cut here --- cut here --- cut here --- cut here --- cut here
- X
- XThe following code module is to be inserted after line 1269 of the file
- XISPIN.rel_2.1/ISPIN/src/ISPIN.c
- X
- XAfter you have inserted this code fragment, cd to
- X
- X ISPIN.rel_2.1/ISPIN/install
- X
- Xthen
- X
- X make ../obj/ispin
- X
- Xthen (when there are no active print jobs)
- X
- X cp ../obj/ispin /usr/spool/lp/ISPIN/ispin
- X
- X
- X--- cut here --- cut here --- cut here --- cut here --- cut here --- cut here
- X#ifdef LP
- X /* If this process is running as setuid to root (uid == 0),
- X then setuid to the requesting user. 05/09/91 LSB */
- X if(geteuid() == 0)
- X {
- X setgid(pass->pw_gid);
- X setuid(pass->pw_uid);
- X }
- X#endif
- X--- cut here --- cut here --- cut here --- cut here --- cut here --- cut here
- END_OF_FILE
- if test 5839 -ne `wc -c <'ISPIN/misc/SUID.dr/mail.msg'`; then
- echo shar: \"'ISPIN/misc/SUID.dr/mail.msg'\" unpacked with wrong size!
- fi
- # end of 'ISPIN/misc/SUID.dr/mail.msg'
- fi
- if test -f 'ISPIN/misc/wrdprfct.doc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ISPIN/misc/wrdprfct.doc'\"
- else
- echo shar: Extracting \"'ISPIN/misc/wrdprfct.doc'\" \(4179 characters\)
- sed "s/^X//" >'ISPIN/misc/wrdprfct.doc' <<'END_OF_FILE'
- XFrom uucp Mon Feb 4 23:51 EST 1991
- X>From lbartz Mon Feb 4 23:35:53 1991 remote from localhost
- XReceived: by localhost.UUCP (4.12/4.7)
- X id AA00203; Mon, 4 Feb 91 23:35:53 est
- XMessage-Id: <9102050435.AA00203@localhost.UUCP>
- XReceived: from cr07 by indy6.indy6.irs.gov id ab00186; 4 Feb 91 23:35 EST
- XReceived: from tis by cr07.cr07.irs.gov id ab24006; 4 Feb 91 22:14 EST
- XReceived: from wr by no1.irs id ac21732; 4 Feb 91 22:18 EST
- XReceived: from sea by wr1.irs id aa00381; 4 Feb 91 9:58 PST
- XDate: 4 Feb 91 9:45:27-EST (Mon)
- XFrom: localhost!"Mwilson at sea"@wr1.ARPA
- XTo: ispinusr@indy6.ARPA
- XStatus: RO
- X
- X
- X
- X
- X
- X
- X INTERFACING ISPIN WITH WORDPERFECT 5.0 AND SCO UNIX V/386
- X
- X
- X Larry "The Supreme Print Commander" Bartz asked me to pass this
- X along in the hopes that it may be of some help to the folks
- X who are running WordPerfect 4.2 on their Sequents.
- X
- X
- X The problem we encountered was that Wordperfect assumes that
- X the "interface" program for each printer is a Bourne shell
- X script. When you use "wpport" to let WP know about the printer
- X it tries to add a few lines of its own to the script in
- X order to format the document for the printer type. If the
- X interface just happens to be "ispintrfce" (a C executable)
- X good ole WP can't do its thing. After a few phone calls to
- X the "Bartzman" we've come up with the following.
- X
- X 1. De-install the printer that you want to use.
- X
- X 2. Create a file that will hold the formatted WP output
- X file for each printer.
- X
- X touch /usr/tmp/yourprinter.tmp
- X
- X or any other directory that suits you. Remember, references
- X to "yourprinter" means the name you give your printer.
- X
- X 3. Put this pseudo interface file in your lp "interface"
- X directory. We call it "wpface"
- X
- X---------------------------CUT HERE-----------------------------------------
- X# wpface
- Xfor option in $5
- Xdo
- X if [ $option = WP50 ]
- X then
- X ### Make sure to change PRINTER.tmp to your "queuename".tmp
- X # and have correct directory references
- X cat /dev/null > /usr/tmp/PRINTER.tmp
- X /u1/WP50/sbin/wpp50 < $6
- X ### Make sure to change PRINTER.tmp to your "queuename".tmp
- X exec /usr/spool/lp/ISPIN/ispin `/bin/basename $0|/usr/bin/tr -d "[\012*]"` $1 $2 "" $4 option /usr/tmp/PRINTER.tmp
- X fi
- Xdone
- Xif [ "$option" = "" ]
- X then
- X exec /usr/spool/lp/ISPIN/ispin `/bin/basename $0|/usr/bin/tr -d "[\012*]"` $1 $2 "" $4 "" $6
- X fi
- X---------------------------CUT HERE------------------------------------------
- X
- X
- X Don't worry about the contents of this just yet. WP will stomp on it
- X and put its junk in when using "wpport"
- X
- X 4. Time to install your printer to the "lp" system
- X "cd" to your interface directory
- X replace the "lpadmin" command options in your ispin
- X documentation with the following:
- X "/usr/lib/lpadmin -pyourprinter -iwpface -v/usr/tmp/yourprinter.tmp
- X
- X Remember that file you created in step 2. That's your "-v"
- X flag option
- X Start your scheduler and do your "accepts" and "enables"
- X
- X 5. Install your printer for WP using "wpport". We've found
- X that WP will try to set the line settings using "stty"
- X which it can't do because the printer isn't connected
- X to particular tty. You defeat this by defining the line
- X type as parallel (Yes it works!!!!!!!!!)
- X
- X 6. Go back to your lp "interface" directory. Copy "wpface"
- X over "yourprinter" interface file created in step 4.
- X Edit the new "yourprinter" file replacing the references
- X to "PRINTER" with "yourprinter" name.
- X
- X 7. That's all. Hope this helps out. I'll be glad to pass
- X along any enhancements or changes that we come across.
- X
- X Mike Wilson
- X S.A. Sys Supp Br.
- X Seattle DO ISD
- X
- X
- END_OF_FILE
- if test 4179 -ne `wc -c <'ISPIN/misc/wrdprfct.doc'`; then
- echo shar: \"'ISPIN/misc/wrdprfct.doc'\" unpacked with wrong size!
- fi
- # end of 'ISPIN/misc/wrdprfct.doc'
- fi
- echo shar: End of archive 14 \(of 15\).
- cp /dev/null ark14isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 15 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-
-