Path: utzoo!utgpu!watserv1!watmath!att!occrsh!uokmax!apple!usc!cs.utexas.edu!uunet!mcsun!tuvie!iiasa!wnp From: wnp@iiasa.AT (wolf paul) Newsgroups: comp.unix.sysv386 Subject: Re: Interactive Port of lpr/lpd Summary: Here's a way around it Message-ID: <891@iiasa.UUCP> Date: 11 Sep 90 07:57:52 GMT References: <510@litle.litle.com> Reply-To: wnp@iiasa.UUCP (wolf paul) Organization: IIASA, Laxenburg/Vienna, Austria, Europe Lines: 69 In article <510@litle.litle.com> kevin@litle.litle.com (kevin p burke) writes: >does anyone have lpr/lpd ported to Interactive? >I've got to use network printers in a mixed (bsd/sysV) network. I don't have lpr/lpd ported (I'd want it, if someone does have it, even diffs to some specified BSD distribution would do!), but I have a way to make printers on the BSD side of the network available to 386/IX machines. It requires that user ids are equivalent across the network, but could probably be modified to use an id like "nobody". Here's how to do it: 1. For each network printer, create a device with the same specs as /dev/null, but with the name /dev/printername. I.e., our laser printers are named h0, h1, etc., and I have devices created like this: mknod /dev/h0 c 2 2 mknod /dev/h1 c 2 2 ... 2. Then go into the sysadm menu, select package mgmt, lp mgmt, add printer. Specify "dumb" as the type, regardless of what type of printer it is, we'll let BSD lpr handle the filtering etc. Specify the appropriate /dev/null equivalent as the device. This will work, even though /dev/null, or the printer-specific equivs are not listed. Give your printer an appropriate name (instead of dumb1, dumb2, etc.). 3. Finally, cd into /usr/spool/lp/admins/lp/interfaces, and modify each of the scripts there to do something like: #ident "@(#)tcpremote 2.4 - 88/07/21" # lp interface for remote printer on a BSD-like system # PRINTHOST=cossun # modify to suit local setup THISHOST=`/usr/ucb/hostname` LPRDEST=`basename $0` REQUEST=$1 OWNER=$2 TITLE="$3" if [ ! -z "$TITLE" ] ; then TITLE="-T$TITLE" ; fi COPIES=$4 OPTIONS=$5 shift; shift; shift; shift; shift FILES="$*" export LPRDEST REQUEST OWNER TITLE COPIES OPTIONS FILES (count=1 while [ $count -le $COPIES ] do for file in $FILES do cat "$file" 2>&1 done count=`expr $count + 1` done exit 0 ) | /usr/ucb/rsh $PRINTHOST lpr -P$LPRDEST -C$THISHOST -J$REQUEST And off you go. -- Wolf N. Paul, IIASA, A - 2361 Laxenburg, Austria, Europe PHONE: +43-2236-71521-465 FAX: +43-2236-71313 UUCP: uunet!iiasa.at!wnp INTERNET: wnp%iiasa.at@uunet.uu.net BITNET: tuvie!iiasa!wnp@awiuni01.BITNET * * * * Kurt Waldheim for President (of Mars, of course!) * * * *