The weirdness is :
lp -d david -o lots of options /prtest
Prints ok, does NOT create 123456-0 and 123456-1 in /usr/spool/lp/temp, just the 123456-0
cat /prtest | lp -d david -o lots of options
Does NOT print, creates 123456-0 and 123456-1
Really odd. As much info as I thought might be relevant follows:
(some redundant serial and parallel printer stuff snipped out for length)
Output of lpstat -t :
ricoh:
queuing is enabled
Printer status : Printing.(Ready.)
Online/Offline : Online.
nethp:
queuing is enabled
Printer status : Printing.(Ready.)
Online/Offline : Online.
newricoh:
queuing is enabled
Printer status : Printing.(Ready.)
Online/Offline : Online.
scheduler is running
no system default destination
device for ricoh: ricoh@192.168.6.99
device for nethp: nethp@192.168.6.99
ricoh accepting requests since 06:19:09 PM Wed 16 Jul 2
nethp accepting requests since 06:33:34 PM Wed 16 Jul 2
david accepting requests since 12:06:27 AM Fri 10 Oct 2
printer ricoh is idle. enabled since 03:55:13 PM Fri 03 Oct 2. available.
printer nethp is idle. enabled since 03:56:28 PM Fri 03 Oct 2. available.
printer david is idle. enabled since 08:42:53 PM Tue 14 Oct 2. available.
/etc/printcap looks like this:
# cat /etc/printcap
# Remote Line Printer (BSD format)
ricoh:\
:lp=:rm=192.168.6.99:rp=ricoh:sd=/usr/spool/lpd/ricoh

f=/usr/spool/lp/admins/lp/interfaces/ricoh
nethp:\
:lp=:rm=192.168.6.99:rp=ricoh:sd=/usr/spool/lpd/ricoh

f=/usr/spool/lp/admins/lp/interfaces/nethp
newricoh:\
:lp=:rm=newricoh:rp=newricoh:sd=/usr/spool/lpd/newricoh:
#
Now the weird thing is printer david is not on lpstat devices list, and is not in scoadmin printer. But it is printing!
And I know it WAS in scoadmin printer, because that's what I used to set it up. It's defined as printing to /dev/null,
with a model HPLAserjet (I think, though I did play around with the Net interface also from
Linuts SCO stuff), and printing to /dev/null, and tweaked the interfaces script.
/usr/spool/lp/admins/lp/interfaces/david is as follows:
#!/bin/ksh
# /usr/spool/lp/model/NetCat - universal network printer interface script
# for OpenServer.
#
# Based on
#
# Create a "Local Printer" in scoadmin
# Select "Net" as the printer model and /dev/null as the device.
# Create a corresponding line in /etc/printers, colon delimited:
# name:address

ort

rotocol:model:comments...
# name = name of the printer given in scoadmin
# address = ip address, hostname, netbios name of the print server
# port = tcp port number, lpr/lpd queue name, windows share name
# protocol = netcat or rlpr (others may be added)
# model = anything in /usr/spool/lp/model
# comments = MAC address & model of the printer & print server are helpful
#
# brian@aljex.com 20060723
LP=/usr/spool/lp
export PATH="${LP}/bin:/bin:/usr/bin:/usr/lib:/usr/local/bin:/usr/gnu/bin"
SELF=${0##*/}
while : ; do
IFS=: read NAME HOST PORT PROTOCOL MODEL COMMENTS || break
[[ "$NAME" = "$SELF" ]] && break
done < /etc/printers
INTERFACE=${LP}/model/$MODEL
[[ -z "$MODEL" ]] && exit 1
[[ -e $INTERFACE ]] || exit 1
whence $PROTOCOL >/dev/null 2>&1 || exit 1
case $PROTOCOL in
netcat) $INTERFACE "$@" | netcat -h $HOST -p $PORT ;;
rlpr) $INTERFACE "$@" | rlpr -H $HOST -P $PORT ;;
esac
/usr/spool/lp/model/HPLaserjet has this line added:
# Set up FILTER environment variable.
FILTER="/usr/lib/lponlcr"
and somehow during all this I have fixed stair-stepping.
David