[comp.unix.admin] help remote print to bsd from sysV

mwette@mr-ed.jpl.nasa.gov (Matt Wette) (01/08/91)

We have several printers attached to machines running SunOS 4.1 and
have a couple of SysV machines that would like to use these printers.
What's the best way to do this?
	1. try to port lpd to sys V machines (Source is available from
	   Berkeley, I believe.)
	2. write custom program to ftp files and run remote process
	3. ???

Matt
-- 
 _________________________________________________________________
 Matthew R. Wette           | Jet Propulsion Laboratory, 198-326
 mwette@csi.jpl.nasa.gov    | 4800 Oak Grove Dr, Pasadena,CA 91109
 -----------------------------------------------------------------

dlr@daver.bungi.com (Dave Rand) (01/09/91)

In article <1991Jan8.201844.7532@intelhf.hf.intel.com> snelson@ptdcell0.intel.com (shannon nelson) writes:
>In article <1991Jan7.173643.18472@jato.jpl.nasa.gov> mwette@mr-ed.jpl.nasa.gov (Matt Wette) writes:
>>We have several printers attached to machines running SunOS 4.1 and
>>have a couple of SysV machines that would like to use these printers.
>>What's the best way to do this?
>As Matt asks above, is there a best way to do this?  Has anyone else
>tried something similar?  Is there already a program in the Usenet
>archives for this?

Yes. The patches for lpr/lpd to run on System V have been posted to
alt.sources, and I have made them available via mail for quite some
time now. Here is the readme.

Mon May 21 12:49:15 PDT 1990

While 386/ix (tm Interactive) has a number of network services from BSD,
lpr is not one of them. This does not cause a real problem, as the
shell scripts of lp can be used to perform remote printing. It is
not a very good solution when interacting with other Sun or BSD
systems.

Jonathan C. Broome <wilbur!jon> did the original port to 386/ix from the
freed lpr sources. I added a few modifications, and re-did the context
diffs from the tar file on uunet (~ftp/bsd-sources/src/network/lpr.tar.Z)

No guarantee that this will work for you, but it works for me.

To use:

Unpack the shell archive, then apply the two patch files lpr.diff.1 
and lpr.diff.2 with patch. The unaltered source files from the lpr 
tar file must be used. The C files included must be in the lpr
directory.


Dave Rand
{pyramid|mips|sun|vsi1}!daver!dlr	Internet: dlr@daver.bungi.com
-- 
Dave Rand
{pyramid|mips|bct|vsi1}!daver!dlr	Internet: dlr@daver.bungi.com

paul@x.co.uk (Paul Davey) (01/09/91)

In article <1991Jan7.173643.18472@jato.jpl.nasa.gov> mwette@mr-ed.jpl.nasa.gov (Matt Wette) writes:

   We have several printers attached to machines running SunOS 4.1 and
   have a couple of SysV machines that would like to use these printers.
   What's the best way to do this?
	   1. try to port lpd to sys V machines (Source is available from
	      Berkeley, I believe.)
	   2. write custom program to ftp files and run remote process
	   3. ???


Create and install a dummy printer using the sys5 lp utilities.
	[see lpadmin(1m)]

Use the script in /usr/spool/lp/model/dummy to rsh or remsh to a Sun
and pipe into lpr.

(If I remember correctly you have to close the file descriptor for
standard output in the script with exec or it hangs).

This can rsh or remsh to a sun and pipe into lpr.

This is easier than 1. or 2. but doesn't handle job listing or cancelation.

It means that software on the sys5 box can still print to lp though.

--
 Regards,			 pd@x.co.uk          IXI Limited
	Paul Davey		 pd@ixi.uucp         62-74 Burleigh St.
				 ...!uunet!ixi!pd    Cambridge  U.K.
 "These are interesting times"   +44 223 462 131     CB1  1OJ      

chris@vision.UUCP (Chris Davies) (01/10/91)

In article <6610@biophys.zir.ethz.ch> ruba@molbio.ethz.ch (Rudolf Baumann)
writes:
>I use the followin lp interface on the SysV machine:

[...]

>		cat "$file" 2>&1 | rsh BSD-machine -l print lpr -Pps || exit 1

You will get problems if the remote host "BSD-machine" is down, or not
available across the network for any reason.  We have a similar setup and I
found that it was necessary to test the result status from rsh (well, we have
rcmd on our TCP/IP implementation) and retry after eg 30 seconds if the
connection failed.  Thus you get (approximately),

:   while :
:   do
:	if cat "$MYFILE" | rcmd "$RHOST" -l "$RUSER" lp ...
:	then
:	    break
:	else
:	    sleep 60
:	fi
:   done

Chris
-- 
VISIONWARE LTD         | UK: chris@vision.uucp    JANET: chris%vision.uucp@ukc
57 Cardigan Lane       | US: chris@vware.mn.org   BANGNET: ...!ukc!vision!chris
LEEDS LS4 2LE, England | VOICE:  +44 532 788858   FAX:  +44 532 304676
-------------- "VisionWare:   The home of DOS/UNIX/X integration" -------------

bmw@isgtec.uucp (Bruce M. Walker) (01/10/91)

In article <1991Jan7.173643.18472@jato.jpl.nasa.gov> mwette@mr-ed.jpl.nasa.gov (Matt Wette) writes:
> We have several printers attached to machines running SunOS 4.1 and
> have a couple of SysV machines that would like to use these printers.
> What's the best way to do this?
> 	1. try to port lpd to sys V machines (Source is available from
> 	   Berkeley, I believe.)
> 	2. write custom program to ftp files and run remote process
> 	3. ???

Stevens, in his book "Network Programming", gives an lpr client as one
of his examples. You can FTP the code from the book from:

	uunet.uu.net: pub/netprog.tar.Z

Or, I could mail you a hack I did.  I started with LPR.C from PC/IP and
now I have lpr, lpq and lprm for SysV (tested on Convergent Tech. and
SGI), but there is almost no LPR.C code left :-)

--
bmw@isgtec.uucp  [ ..uunet!utai!lsuc!isgtec!bmw ]  Bruce Walker