Has anyone come up with a method to do printer classes using remote printers
under SCO? I am unable to do classes on another system, since the printers are
a mix of Jet Direct cards and Axis print servers.
--
Måns Nilsson MN1334-RIPE
Finger mans...@bartlet.df.lth.se for details. GSM 070 8344045
You mean now I can SHOOT YOU in the back and further BLUR th'
distinction between FANTASY and REALITY?
>As I have discovered, after much grief, SysV printing does not support
>printer classes for BSD-style lpd print queues. Not on OpenSewer, and
>not on Slowaris. The only solution as I see it now is to get an NT
>server to do the pooling and print through it via lpd, which the
>customer naturally is a little bit worried over, with NT reliability
>issues and the like. My question would then be this:
>Has anyone come up with a method to do printer classes using remote
>printers under SCO? I am unable to do classes on another system,
>since the printers are a mix of Jet Direct cards and Axis print servers.
EasySpooler by Seay Systems not only can do class printing, it also
can split a _single_ report over multiple printers.
"OpenSewer" ? do you really expect an answer ?
--
Jim Pazarena mailto:p...@ccstores.com
http://www.qcislands.net/paz
>As I have discovered, after much grief, SysV printing does not
>support printer classes for BSD-style lpd print queues. Not on
>OpenSewer, and not on Slowaris. The only solution as I see it now
^^^^^^^^^^^^^
>is to get an NT server to do the pooling and print through it via
^^^^^^^^^^^^^^^
In addition to the other comments made here, why do you think
that NT is the ONLY solution for BSD-style lpd. There are
plenty of BSD solutions for iNTEL in the market today. I can think
of at least 4. BSDI (not sure of current pricing but they
typically have priced at 1/2 of SCO's license charges, and has full
tech support), FreeBSD, OpenBSD (strong security orientation), and
NetBSD. They will definately be much cheaper than an NT solution,
if NT is indeed a solution.
--
Bill Vermillion bv @ wjv.com
All software sucks. Some sucks less, though.
--
Måns Nilsson MN1334-RIPE
Finger mans...@bartlet.df.lth.se for details. GSM 070 8344045
I just got my PRINCE bumper sticker ... But now I can't remember WHO he is ...
Nobody would be happier than yours truly if there was a LPD package for
a free *nix capable of making a printer class out of several remote
printers. NT can do this. Nobody has told me if there is a LPD that can do
this, just told me that there are free systems that can do LPD.
I know this. But the customer _needs_ classes (or an equivalent, but a
queue that can print to several printers, but under only one name.)
So, if we can agree that NT sucks, which we can, I think, is there a
solution for this, other than NT?. Linux would be very nice, since there
is some competence on it at the site.
regards,
You can define all local printers that forward to the remote printers
in the interface script then class them all you want. Generally I
setup remote printers with the same name as the local printer but with
a leading 'r'. The local printer interface just does
... | lp -dr$printer
where $printer is determined from the script name (i.e. basename $0).
I did an implementation that would wait for the remote printer queue
to empty before forwarding the job. This would get you the right
disbursment of jobs sent to a class.
You could also use my netcat program
(http://www.cruzio.com/~jeffl/sco/lp/) to address the jetdirects
directly from a local printer interface script and I've recently
started using axis's prossysv.c (modified to read stdin) to do the
same (the rtelnet interface seems to not like direct output from
netcat... probably need to negotiate some telnet options...).
This is the interface to sit on the remote queue and forward jobs
------ stsnet ------
:
# @(#)stsnet - model lp interface to forward to remote printer
# @(#)STS/KBS Sep 25 1995
#! ShadeTree Software, Inc. Printer Interface Model
# Look for remote printer (/etc/printcap) the same as our current
# name but with an 'r' prefix. Wait for the remote print queue to
# empty, then forward the current job to the remote printer
PRINTCAP=/etc/printcap
LOCALPATH=/usr/spool/lp/bin
PATH=$PATH:$LOCALPATH:/usr/lib
LPBASE=`basename $0` # get printer name from cmd
# exit and cancelation special processing
_cancel() {
# cancel printing
:
}
_exit() {
# clean up before leaving
:
}
_init() {
# printer initialization
:
}
_fail() {
# Failed to forward request. Disable printer
failmsg="$*"
echo "$failmsg" >&2
disable -r "$failmsg" $LPBASE
exit 1
}
#Get remote printer queue
RLP=r${LPBASE}
[ ! -r $PRINTCAP ] && _fail "Cannot read $PRINTCAP"
queue=`
sed -n '
/^#/d
/^[ ]*$/d
/\\\/ {
s/\\\/ /g
H
b
}
H
g
s/\n/ /g
s/\(:..\):/\1=:/g
s/\(:..\)#/\1=/g
s/:/ /g
s/^[ ]*/printer=/
p
s/.*//
h
' $PRINTCAP |
while read line
do
eval "$line" # set variables from joined line
[ x"$printer" = x$RLP ] && {
echo "$sd"
break
}
done
`
[ x"$queue" = x ] && _fail "Cannot determine queue for remote printer $RLP"
while :
do
break=yes
for qf in $queue/cf*
do
[ -f $qf ] && {
sleep 5
break=no
break
}
done
[ $break = yes ] && break
done
#Set up the default filter.
if [ -x "${LOCALPATH}/lp.cat" ]
then
LPCAT="${LOCALPATH}/lp.cat 0"
else
LPCAT="cat"
fi
# trap exits and cancelations and perform special processing
trap '_exit' 0
trap '_cancel;exit 0' 1 2 3 15
nhead=0 # set to 1 or more to enable banners
printer=`basename $0`
request=$1
name=$2
title=$3
copies=$4
options=$5
shift; shift; shift; shift; shift
# If it is necessary to change the baud rate or other stty settings for
# your serial printer add the appropriate options here:
# stty onlcr time 30 <&1
# border around the banner
x="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
# the fifth field of the /etc/passwd file is assigned to the variable user
user=`sed -n "s/^$name:.*:.*:.*:\(.*\):.*:.*$/\1/p" /etc/passwd`
{
# initialize the printer
_init
# print the banner $nhead times
while [ "$nhead" -gt 0 ]
do
echo "$x\n"
banner "$name"
echo "$x\n"
[ "$user" ] && echo "User: $user\n"
echo "Request id: $request\n"
echo "Printer: $printer\n"
date
echo
[ "$title" ] && banner $title
echo "\f\c"
nhead=`expr $nhead - 1`
done
n=1
while [ $n -le $copies ]
do
# send the file(s) to the standard out $copies times
for file
do
0<$file eval ${LPCAT} 2>&1
echo "\f\c"
done
n=`expr $n + 1`
done
} | lponlcr | lp -d${RLP} -s
exit 0
--
Do two rights make | Kevin Smith, ShadeTree Software, Philadelpha, PA, USA
a libertarian | 001-215-487-3811 shady.com,kevin bbs.cpcn.com,sysop
>directly from a local printer interface script and I've recently
>started using axis's prossysv.c (modified to read stdin) to do the
>same (the rtelnet interface seems to not like direct output from
>netcat... probably need to negotiate some telnet options...).
For those not familiar with prossysv.c, it is supplied with every Axis
print server in a rather odd manner. It's not on the driver disks or
downloadable from the web site. You have to ftp it from the print server
itself. There's also a built in "password" as part of the command line.
What prossysv.c does is run as a deamon and create a device node in the
/dev/directory that points to the remote printer. If you send text to the
device node, it will print. This allows the use of the stock SCO print
spooler features (with filters and classes) as if the printer were locally
attached. You can probably use this with the Axis print servers to create
a pool of printers, but it won't play with the HP JetDirect.
Since numerophobia (fear of numbers) seems to be currently epidemic in this
newsgroup, I'll assume that it's an Axis 540 single port parallel 10barfT
print server. For information on the various methods of printing to an
Axis 540 print server, see the techy reference at:
http://www.axis.com/ftp/pub/axis/manuals/tech_refs/nps_tr20.pdf (2MB)
Hmmm. Looks like the tech reference is the same for all models.
I did slam into one nasty bug with using the prossysv.c daemon. I
non-cleverly named my devices using fairly long and descriptive printer
names. Unfortunately, all of these devices started with the same string:
/dev/axis_540_01_pr04
or something like that. However, the spooler lock files are by the first 7
characters of the device name. You can guess what happened. Ignore the
examples in the instructions and use short and unique device names.
--
Jeff Liebermann 150 Felker St #D Santa Cruz CA 95060
(831)421-6491 pgr (831)426-1240 fax (831)336-2558 home
http://www.cruzio.com/~jeffl WB6SSY
je...@comix.santa-cruz.ca.us je...@cruzio.com
> Nobody would be happier than yours truly if there was a LPD package for
> a free *nix capable of making a printer class out of several remote
> printers. NT can do this. Nobody has told me if there is a LPD that can do
> this, just told me that there are free systems that can do LPD.
> I know this. But the customer _needs_ classes (or an equivalent, but a
> queue that can print to several printers, but under only one name.)
You can do anything you need to do using the concept of virtual
printers- a local printer that redirects itself elsewhere. Set up
several of these, put them in a class, and you have what you want.
Another advantage of this for LPD printers is that you get to use any
interface script you want.
I think the easiest and most maintainable way to do virtuals is to
follow the same sort of scheme the hpnp uses but modify it with the
"network" model: use an upper level interface like the one in
/usr/lib/hpnp/model that filters output through a standard interface in
interfaces/model.orig, but have it pickup the remote that it finally
pipes to from /usr/spool/lp/remote like the network model does.
--
Tony Lawrence (to...@aplawrence.com)
SCO ACE
SCO articles, help, book reviews: http://www.aplawrence.com
The original post to which Tony posted his reply, seems to be
missing here, so I'll use this message . This only addresses the
'free *ix' portion as Tony thoroughly covered the rest.
>> Nobody would be happier than yours truly if there was a LPD
>> package for a free *nix capable of making a printer class out of
^^^^^^^^^^^^^
>> several remote printers. NT can do this. Nobody has told me if
>> there is a LPD that can do this, just told me that there are free
>> systems that can do LPD. I know this. But the customer _needs_
>> classes (or an equivalent, but a queue that can print to several
>> printers, but under only one name.)
Don't know if this will answer you questions but it might bear
further investigation.
------------------------------------------------------------
LPR(1) FreeBSD General Commands Manual LPR(1)
NAME
lpr - off line print
SYNOPSIS
lpr [-Pprinter] [-#num] [-C class] [-J job] [-T title] [-U user] [-i
^^^^^^^^^^^
....
HISTORY
The lpr command appeared in 3BSD.
BUGS
Fonts for troff(1) and tex reside on the host with the printer. It is
currently not possible to use local font libraries.
4th Berkeley Distribution June 6, 1993 3
------------------------------------------------------------
Since I've never used Classes I don't know if that's what you want,
but the entire LP system is Berkely based BSD. But it at least
partially meets your request - it's a free *ix system using the
Berkeley heritage and not the Sys V lineage.
You are correct, mine is an axis 540, but my prossysv.c is not acting
as a server. It expects to be executed as an interface script and
takes arguments accordingly. It only uses the username, copes, and
filename(s) arguments. I modified it to take '-' as a filename and
read stdin so I could included it in a pipeline in regular interface
script.
There is some goofy code where it fork()s a sub-process to do the
network transfer but the parent just waits for the child to finish
and there's no particular reason it couldn't just be done in line.
There's also a prosbsd.c (bsd variant) that I havn't really looked at
but seems to do something similar but expectes to be invoked differenly.
I.e. berkley lpr related args I presume.
--
Do two rights make | Kevin Smith, ShadeTree Software, Philadelphia, PA, USA