Well, I have a suggestion, that is similar to the
one I made about errors.
lp:
:send_try=1
:send_failure_action=|/usr/libexec/filters/stupid_hp4500
The 'stupid_hp4500' is called with all of the filter options.
#!/bin/perl
use $FileHandle;
use Getopt::Std;
my(%args,%options);
# get the arguments
getopt(
"a:b:cd:e:f:g:h:i:j:l:m:n:o:p:q:r:s:t:u:v:w:x:y:z:" .
"A:B:C:D:E:F:G:H:I:J:L:M:N:O:P:Q:R:S:T:U:V:W:X:Y:Z:",
\%args );
my( $file, $now );
$now = time;
$file = new FileHandle( "<hp4500" );
if( $file ){
while( <$file> ){
chomp;
($job,$time) = split if $_;
}
}
my( $printcap );
foreach $k ( grep ":" split( "\n", $ENV{PRINTCAP_ENTRY} ) ){
$k =~ s/^\s+//;
$k =~ s/\s+$//;
if( $k =~ /=/ ){
my ($key, $value);
($key,$value) = split( "=", $k, 2 );
$value = if( not defined $value );
$options{$key} = $value;
} else if( $k =~ /@$/ ){
$options{$k} = 0;
} else {
$options{$k} = 1;
}
}
$options{timeout} = 5 if not $options{timeout};
if( $args{k} eq $job ){
# we timed out again
if( $now - $time > (60 * $options{timeout} ) ){
# magic thing to send alert to operator
`$options{action} $PRINTER` if $options{action};
print "abort\n";
exit 0;
}
} else {
$file = new FileHandle( ">hp4500" );
print $file "$now $args{k}\n";
}
print "fail\n"
exit 0
if
> From [EMAIL PROTECTED] Fri Jan 25 10:11:25 2002
> Date: Fri, 25 Jan 2002 12:16:37 -0500
> To: [EMAIL PROTECTED]
> From: Dan Kirkpatrick <[EMAIL PROTECTED]>
> Subject: LPRng: HPclj 4500 timeout on warmup
>
> Any fix yet for the HP color laserjet 4500 timing out on long warmup procedure?
>
> Anytime the printer goes into powersave, lprng doesnt wait long enough for
> warmup and queue gets hung.
>
> Thanks,
> Dan
>
> =======================================================
> Dan Kirkpatrick [EMAIL PROTECTED]
> Computer Systems Manager
> Department of Physics
> Syracuse University, Syracuse, NY
> http://www.physics.syr.edu/help/ Fax:(315) 443-9103
> =======================================================
>
>
> -----------------------------------------------------------------------------
> 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.
> -----------------------------------------------------------------------------
>
-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------