Howdy. I'm setting up LPRng-3.6.26, with ifhp-3.4.2. I'm trying to
get accounting working. I'm getting a confusing assortment of command
line options being sent to the "accounting=" script. The relevant
portions of the printcap file are included below.
ifhp comes with a sample script called "accounting.sh". I made a
similar perl program, and in testing, am printing out the list of
command line arguments with:
foreach ( @ARGV ) {
print FH "$_\n";
}
The option list is below. As you can see, various options repeat,
sometimes with different values, for example "-b1" and "-b339". Can
you tell me why there are duplicate options, and how I'm supposed to
go about parsing the list?
(Bytheway, the script gets called twice, once with "start" as the
first argument, the second time with "end" as the first argument.
The output below is from the second call. I'd really prefer to have
it called just once at the end. Any suggestions?)
---- start of options to accounting= script ----
end
-b1
-T26
-q5682
-p548
-t2000-11-17-15:23:14.159
-Ades@replaceoberon+678
-ndes
-Ppr64
-Ades@replaceoberon+678
-CA
-D2000-11-17-15:22:47.364
-Fo
-Hreplaceoberon.cs.duke.edu
-J/home/home2/des/.displayrc
-Ppr64
-Q128
-SHP 4050N outside D128 LSRC
-Tquiet
-Zsimplex
-aacct
-b339
-d/var/spool/lpd/pr64
-hreplaceoberon.cs.duke.edu
-j678
-kcfA678replaceoberon.cs.duke.edu
-l66
-ndes
-sstatus
-t2000-11-17-15:22:48.000
-w80
-x0
-y0
---- end of options to accounting= script ----
---- start of printcap entry ----
pr64|128|128-sx|128-dx|128-mf
:server
:cm=HP 4050N outside D128 LSRC
:tc=.hp4050n
.hp4050n
:suspend_of_filter
:ifhp=model=hp4050,of_options=pagecount waitend
accounting=/usr/local/libexec/filters/acc.pl
:tc=.standard
.standard
:mx#0
:rw
:qq
:create_files
:ps=status
:af=acct
:lf=log
:spool_lock_file=lock.%P
:max_status_size=1024
:min_status_size=512
:max_log_file_size=1024
:min_log_file_size=512
:pl#66
:pw#80
:lp=%P%9100
:sd=/var/spool/lpd/%P
:as=|/usr/local/libexec/filters/accounting.pl start
:ae=|/usr/local/libexec/filters/accounting.pl end
:filter=/usr/local/libexec/filters/csif
:of=/usr/local/libexec/filters/csof
:bp=/usr/local/libexec/filters/csbanner
---- end of printcap entry ----
Note: "csif" and "csof" are a wrapper for "ifhp" and "ofhp" that just
do some option processing based on printer type.
Thanks.
-Dan
--
Daniel E. Singer, Systems Administrator
Dept. of Computer Science, Duke University, Durham NC 27708 USA
[EMAIL PROTECTED], www.cs.duke.edu/~des, (919)660-6577
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------