Print out disappers on SCO System


 
Thread Tools Search this Thread
Operating Systems SCO Print out disappers on SCO System
# 8  
Old 06-16-2010
That is an escape sequence to turn LF into CRLF otherwise a laser printer would print the entire report on the first line, and probably not eject the page, leaving you with the impression that nothing went to the printer.

You could try this for a printer interface.
Create a new printer, local using /dev/null for the device, and dumb for the interface.
Modify the /usr/spool/lp/admins/lp/interfaces/destination to look like the following.

Code:
: ${LOCALPATH:=${SPOOLDIR}/bin}          
                                         
F=`/bin/basename $1`                     
                                         
copies=$4                                
shift; shift; shift; shift; shift        
files="$*"                               
i=1                                      
while [ $i -le $copies ]                 
do                                       
        for file in $files               
        do                               
        echo "root\n" >/tmp/$F           
        echo "put $file LPT1" >>/tmp/$F  
        echo "quit" >>/tmp/$F            
        ftp office </tmp/$F              
        done                             
        rm /tmp/$F                       
        i=`expr $i + 1`                  
done                                     
                                         
                                         
exit 0

Where 'office' is the IP/hostname of the printer, and LPT1 is the queue name of the jetdirect.
# 9  
Old 06-17-2010
When I originally added the printer, it created the following files the
/usr/spool/lp/admins/lp/interfaces/corpitlbl

Code:
 
MODEL=`basename $0`
REALMODEL=`echo $0 | sed -e "s%$MODEL%model.orig/$MODEL%"`
#
# This name may be initialized when the script is
# installed in the spooler.  If not, use the name
# of this script ($MODEL) as the peripheral to contact.
#
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
#
# Remove the log file if job is cancelled
# or the scheduler is shutdown.
#
trap "rm -f $LOG $LPLOG; trap 15;kill -15 0;exit 0" 15
ERRORLOGS=0
while :
do
    #
    # Save the stderr messages in a temporary log file
    # and discard stdout which is the peripheral output.
    #
    rm -f $LOG
    if $REALMODEL "$@" | $HPNPF -x $PERIPH 2> $LOG > /dev/null
    then
 #
 # If the transfer is successful, remove
 # the log file and exit.
 #
 rm -f $LOG $LPLOG
 exit 0
    else
 #
 # Added the request ID to the stderr message
 # and store it in the lp log file.
 #
 # Only record the first $LOGTRIES errors.  If
 # the spooler gets in a loop retrying a job, the
 # disk won't fill up with spooler log error messages.
 #
 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
    sleep 10
done

/usr/spool/lp/admins/lp/interfaces/model.orig/corpitlbl

Code:
 
#ident "@(#)lp:model/dumb 1.3.1.2"
# lp interface for dumb line printer
#
x="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
#Set up some global variables.
: ${SPOOLDIR:=/usr/spool/lp}
: ${LOCALPATH:=${SPOOLDIR}/bin}
#Set up the default filter.
if [  -x "${LOCALPATH}/lp.cat" ]
then
 LPCAT="${LOCALPATH}/lp.cat 0"
else
 LPCAT="cat"
fi
#If we are not using a filter, use the default one.
if [ -z "${FILTER}" ]
then
 FILTER="${LPCAT}"
fi
if [ -x "${LOCALPATH}/drain.output" ]
then
 DRAIN="${LOCALPATH}/drain.output 1"
else
 DRAIN=
fi 
nobanner="no"
if [ -z "${BANNERS}" ]
then
 nhead=1
else
 nhead=${BANNERS}
fi
for i in $5
do
 case "${i}" in
 nobanner )
  nobanner="yes"
  ;;
 esac
done
if [ "no" = "${nobanner}" ]
then
 while [ $nhead -gt 0 ]
 do
  echo "\014\c"
  echo "$x\n$x\n$x\n$x\n"
  banner "$2"
  echo "\n"
  user=`grep "^$2:" /etc/passwd | line | cut -d: -f5`
  if [ -n "$user" ]
  then
   echo "User: $user\n"
  else
   echo "\n"
  fi
  echo "Request id: $1    Printer: `basename $0`\n"
  date
  echo "\n"
  if [ -n "$3" ]
  then
   banner $3
  fi
  nhead=`expr $nhead - 1`
 done
fi
copies=$4
echo "\014\c"
shift; shift; shift; shift; shift
files="$*"
i=1
while [ $i -le $copies ]
do
 for file in $files
 do
  0<${file} eval ${FILTER} 2>&1
  echo "\014\c"
 done
 i=`expr $i + 1`
done
if [ "no" = "${nobanner}" ]
then
 echo "$x\n$x\n$x\n$x\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
 echo "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n$x\n$x\n$x\n$x"
 echo "$x\n$x\n$x\n$x\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
 echo "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
 echo "$x\n$x\n$x\n$x\n$x\n$x\n$x\n$x\n"
fi
#Draining characters might be necessary.
${DRAIN}
exit 0

So I'm not sure which file to add to and where in the file.

Thanks for you help.
# 10  
Old 06-17-2010
Just create a new local printer, not a HP network printer, then replace the portion of the interface file.
# 11  
Old 06-17-2010
Will not be at the clients site until Tuesday, will try it then.

Thanks
# 12  
Old 07-15-2010
hello
please
I have the same problem and I wonder if you already solved.
How did you do?
thanks

# 13  
Old 07-15-2010
Edgar,
Start a new thread and post some specifics about the hardware.

Jack
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. SCO

SCO Development System for System V 3.2 R4.2

Hi Guys, Some time ago I get a disk for my SCO System V 3.2 R4.2 tcp 1.2.1 distribution. Now 4 Year later I am serarching the development system due to the fact that System V did not come with the C compiler. There is any change to get it ? my intention is academyc only. or anyone... (3 Replies)
Discussion started by: locovich
3 Replies

2. SCO

laser print on sco openserver 6.0

Dear friends, Please tell me How install ethernet hp laser print p4015n on open server sco 6.0. Thank you, Edgar Guevara (10 Replies)
Discussion started by: Edgar Guevara
10 Replies

3. SCO

Help on System Freeze in SCO

Hi, My SCO server freezes suddenly. I just want to know if there any tools / commands availble that can find which is causing the freeze? Any help on this would be greatly appreciated. Regards, Ravikumar R (4 Replies)
Discussion started by: rrb2009
4 Replies

4. SCO

Sco openserver 5 print queue problems

Hwey I manage a Unix box where I ama having multiple printer problems. the only way to get printers to print again is by rebooting. I stop and start services with no luck. Any one have any ideas? It can go weeks with being OK but then any given printer can go and cause the entire print queue to... (6 Replies)
Discussion started by: uk2us88
6 Replies

5. SCO

SCO system V documentation

Hi! I'm about to throw away a shelf meter or so of SCO system V official documentation. The original beige binders. I'm not sure if there is a shortage of these old books, but if anyone near Gothenburg, Sweden has use for them. Drop me a line at : martin (dot) rudolfson at mac (dot) com Martin (4 Replies)
Discussion started by: iMan
4 Replies

6. UNIX for Dummies Questions & Answers

Full System Backup Sco 5.0.5

I would like to know if I can do a full system back up on my Unix Sco openserver 5.0.5 Machine. If so, What is the syntax to do this or where can I find this information at? Also, is it possible to make this tape bootable so that I can easily do a full system restore? Any information on... (2 Replies)
Discussion started by: nellenodrog
2 Replies

7. UNIX for Advanced & Expert Users

Disable/Enable HP print services SCO OS 5

We're running SCO Open Server 5. On occassion we need to disable/enable HP print services. There's nothing that I have found in the HP printer manager that allows for this. I know we can stop/start print services via SCOADMIN. On occassion one of our HP printers will generate an error, the msg in... (4 Replies)
Discussion started by: sighbrrguy
4 Replies

8. SCO

where can get iso of sco system v 5.05

hi all please someone tell me where can get iso of sco System V vs 5.05 regards (1 Reply)
Discussion started by: weramirez
1 Replies

9. SCO

system log of SCO

Hi, I did shutdown and restart SCO server, now wanna find log to know exactly when system was effected. I took a look at /var/adm/ but seem there are no logs for my required information. it seems diff from Sun or HP UNIX... appreciate all your help. Thanks (2 Replies)
Discussion started by: milo
2 Replies

10. Filesystems, Disks and Memory

SCO TCP/IP runtime System for SCO Unix

Hi everyone i have a question for all of you. It may be basic or it may be a good one. I recently aquired a copy of "SCO TCP/IP runtime System for SCO Unix" (thats what the disks say) and for the life of me i can not get it to load. i have tried opening the disk in linux and it can not determine... (0 Replies)
Discussion started by: Cerberus
0 Replies
Login or Register to Ask a Question