Also, is there a way to use the Jet Direct with three prots on it (Jet
Direct 500) ?
MODEL=`basename $0`
REALMODEL=`echo $0 | sed -e "s%$MODEL%model.orig/$MODEL%"`
PERIPH=
if [ "$PERIPH" = "" ]
then
PERIPH=$MODEL
fi
LOG=/tmp/$PERIPH.$$
HPNPF=/usr/lib/hpnp/hpnpf
LPLOG=/tmp/hpnpf.$$
LOGTRIES=5
echo "$1\t$REALMODEL | $HPNPF -x $PERIPH" >> $LPLOG
trap "rm -f $LOG; rm -f $LPLOG; trap 15;kill -15 0;exit 0" 15
ERRORLOGS=0
while :
do
rm -f $LOG
if $REALMODEL "$@" | $HPNPF -x $PERIPH 2> $LOG > /dev/null
then
rm -f $LOG
exit 0
else
if test -s $LOG -a $ERRORLOGS -lt $LOGTRIES
then
echo "$1\t`cat $LOG`" >> $LPLOG
ERRORLOGS=`expr $ERRORLOGS + 1`
fi
if test $ERRORLOGS -eq $LOGTRIES
then
echo "$1\t$LOGTRIES errors logged for $1; errors no longer
logged" >> $LPLOG
ERRORLOGS=`expr $ERRORLOGS + 1`
fi
fi
if [ ! -s $LPLOG ]
then
rm -f $LPLOG
fi
done
You want to edit the interface script in
/usr/spool/lp/admins/lp/interfaces/model.orig - it will have the same name as
your printer. See http://pcunix.com/SCOFAQ/scotec7.html
--
Tony Lawrence (to...@aplawrence.com)
SCO/Linux articles, help, book reviews, tests,
job listings and more : http://www.pcunix.com
"Tony Lawrence" <to...@pcunix.com> wrote in message
news:3B966F5A...@pcunix.com...
Well, if you'd read what I wrote, maybe you would have had better luck.
The script you posted filters its output through the script in
/usr/spool/lp/admins/lp/interfaces/model.orig - that's how it works. This is
explained more fully in the FAQ that I also referred you to, but apparently
you didn't bother to look at that either.
I know I'm sounding a little testy, but sheesh! You have to READ. If you
read the damn script itself you would have seen how it works, but probably
you don't understand scripting enough to follow it- that's OK, we're not all
programmers, so that's why I pointed you to where the real script is, and to
the FAQ if you wanted to understand it better.
Oh, and BTW- your question about using the other ports was also covered in
the FAQ you didn't bother to read, but I'll reproduce it here:
"If you need to use one of the multiport HP Jetdirects (two or more parallel
ports), see http://www.sco.com/cgi-bin/ssl_reference?104997 and
http://www.sco.com/cgi-bin/ssl_reference?105327 "
It gets all it needs to know from the second line of instructions
in the script you posted.
--
Bill Vermillion - bv @ wjv . com
>I have been able to set this up and print with it but, it prints a blank
>page, then prints Username page, the print job, then followed by two pages
>with XXXXXXXXXXXXXXXX on them. How do I just get it to print the print job?
>I do not want the initial form feed either.
>
>Also, is there a way to use the Jet Direct with three prots on it (Jet
>Direct 500) ?
I'll assume that you're using 3.2v5.0.5 and HPNP (HP Network
Printing). The script you posted is part 1 of a two part mess. Look
in:
/usr/spool/lp/admins/lp/interfaces/model.orig/name-of-your-printer
for the "real" print spooler script. However, something else is wrong
because the leading banner page is suppose to have the XXXXXX on the
first page. Look for accidental double spacing which is probably a
function of the internal printer settings (i.e. add a LF for every
CR).
Tony answered all your questions on butchering the spooler scripts.
When you're done with that exercise, may I suggest you abandon the
HPNP pretzel, and try "netcat" which prints directly to the IP socket
number on your print server. See:
http://www.cruzio.com/~jeffl/sco/lp/
and dig through the mess. Netcat is faster, neater, easier, and
doesn't leave trash all over /tmp. Your JetDirect 500 uses ports
9100, 9101, and 9102 respectively for ports 1 thru 3. See:
http://www.cruzio.com/~jeffl/sco/lp/printservers.htm
for the shopping list of port numbers.
Also see:
http://www.tkrh.demon.co.uk/netcat.html
for a more coherent explanation and spooler scripts.
--
Jeff Liebermann 150 Felker St #D Santa Cruz CA 95060
(831)421-6491 pgr (831)426-1240 fax (831)336-2558 home
http://www.LearnByDestroying.com WB6SSY
je...@comix.santa-cruz.ca.us je...@cruzio.com
I can stop with this message. I am sure my wife and kids are wondering why
Dad just laughed out loud, all alone, in his office, staring at that dumb
'puter.