tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Rahveen Ramnath <Rahveen.Ramnath () unilever ! com>
To: tru64-unix-managers
Subject: Custom printer scripts
Date: Fri, 15 Jun 2001 08:41:40 +0000	[thread overview]
Message-ID: <102653649621860.tru64-unix-managers.marc@archive.invalid> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: multipart/mixed; boundary="--3604553-17115-992594505=:95", Size: 4029 bytes --]

--3604553-17115-992594505=:95
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-Language: en-USA

Hello Tru64-Unix-Managers.

I am new to Tru64 Unix.  I am trying to configure a printer to execute a Unix
script when it receives a request to print a report.  At this stage, I would
simply like the script to copy the contents of the report to a file in the /tmp
directory.  I have searched this list and was able to find some information on
how to achieve this and have managed to do this with some degree of success. 
Here are the details of what I have done:

The printer definition in  /etc/printcap
------------------------------------------------

loc2|lp4|loc2:\
        :of=/home/root/rrprn.sh:\
        :lp=/dev/null:\
        :sd=/usr/spool/lpd4:


My script /home/root/rrprn.sh
--------------------------------------
#! /bin/csh -f
/bin/cat > /tmp/test$$

The problem is that when I send a report to this printer (lp -d loc2
/etc/hosts), the report just sits in the queue.  If I shut down and restart
lpd, it would then print process only the FIRST report in the queue and not the
subsequent ones.  I cannot find out what is wrong.  Please help.  


Output from lpstat
-----------------------
loc2:
Fri Jun 15 10:14:51 2001: 
Rank   Pri Owner      Job     Files                              Total Size
1st    0   root       11      /etc/hosts                           2090 bytes

Output from lpc
--------------------
lpc> status loc2
loc2:
        printer is on device '/dev/null' speed -1
        queuing is enabled
        printing is enabled
        1 entry in spool area
        Fri Jun 15 10:14:51 2001: 
lpc> 

Logs
------
Nothing appears in the logs below
/usr/adm/lp*
/var/adm/syslog.dated/current/lpr.log



Thanks

Rahveen Ramnath
Unilever South Africa, Durban
email:  rahveen.ramnath@unilever.com

--3604553-17115-992594505=:95
Content-Type: TEXT/x-cdsi-msrtf; CHARSET=US-ASCII
Content-ID: 0
Content-Language: en-USA

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fscript\fcharset0 Comic Sans MS;}}
\viewkind4\uc1\pard\f0\fs20 Hello Tru64-Unix-Managers.\par
\par
I am new to Tru64 Unix.  I am trying to configure a printer to execute a Unix script when it receives a request to print a report.  At this stage, I would simply like the script to copy the contents of the report to a file in the /tmp directory.  I have searched this list and was able to find some information on how to achieve this and have managed to do this with some degree of success.  Here are the details of what I have done:\par
\par
The printer definition in  /etc/printcap\par
------------------------------------------------\par
\par
loc2|lp4|loc2:\\\par
        :of=/home/root/rrprn.sh:\\\par
        :lp=/dev/null:\\\par
        :sd=/usr/spool/lpd4:\par
\par
\par
My script /home/root/rrprn.sh\par
--------------------------------------\par
#! /bin/csh -f\par
/bin/cat > /tmp/test$$\par
\par
The problem is that when I send a report to this printer (lp -d loc2 /etc/hosts), the report just sits in the queue.  If I shut down and restart lpd, it would then print process only the FIRST report in the queue and not the subsequent ones.  I cannot find out what is wrong.  Please help.  \par
\par
\par
Output from lpstat\par
-----------------------\par
loc2:\par
Fri Jun 15 10:14:51 2001: \par
Rank   Pri Owner      Job     Files                              Total Size\par
1st    0   root       11      /etc/hosts                           2090 bytes\par
\par
Output from lpc\par
--------------------\par
lpc> status loc2\par
loc2:\par
        printer is on device '/dev/null' speed -1\par
        queuing is enabled\par
        printing is enabled\par
        1 entry in spool area\par
        Fri Jun 15 10:14:51 2001: \par
lpc> \par
\par
Logs\par
------\par
Nothing appears in the logs below\par
/usr/adm/lp*\par
/var/adm/syslog.dated/current/lpr.log\par
\par
\par
\par
Thanks\par
\par
Rahveen Ramnath\par
Unilever South Africa, Durban\par
email:  rahveen.ramnath@unilever.com\par
\par
}

--3604553-17115-992594505=:95--

                 reply	other threads:[~2001-06-15  8:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox