Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 May 1999 11:08:21 -0600 (MDT)
From:      "David G. Andersen" <danderse@cs.utah.edu>
To:        Andreas Klemm <andreas@klemm.gtn.com>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: lpd woes ... missing feature that different printer share same spool
Message-ID:  <14156.10638.531747.843524@torrey.cs.utah.edu>
In-Reply-To: Andreas Klemm's message of Tue, May 25 1999 <19990525220603.A5481@titan.klemm.gtn.com>
References:  <19990525220603.A5481@titan.klemm.gtn.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Thankfully, the problem isn't in lpd, it's in chkprintcap.
Index: chkprintcap.c
===================================================================
RCS file: /n/marker/usr/lsrc/FreeBSD/CVS/src/usr.sbin/lpr/chkprintcap/chkprintcap.c,v
retrieving revision 1.2
diff -c -r1.2 chkprintcap.c
*** chkprintcap.c       1997/12/06 05:37:18     1.2
--- chkprintcap.c       1999/05/18 22:11:58
***************
*** 114,120 ****
--- 114,122 ----
                if (interpret_error(pp, error) && more)
                        goto next;
        }
+ #if 0
        check_spool_dirs();
+ #endif
        return problems;
  }

Works like a charm here - we have about 15 aliases for the same
printer (simplex, duplex, input bins, output bins, staple, etc).
There may be some danger in doing this, but we haven't really run in
to problems with it. (*)

   -Dave

(*) - we do have a problem whereby two jobs for different settings of
the printer can end up shifting the input/output bin of the other job.
I haven't bothered to look in to it yet to figure out if it's because
of the spool directory;  I think it's instead a problem with our
printer setup script.

Lo and Behold, Andreas Klemm said:
> Hi !
> 
> lpd refuses to startup, if you have multiple entries in /etc/printcap
> that use the same spooldir.
> 
> My new apsfilter 5.1.1 has the new feature, that you can print in
> high, medium and low density by simply typing:
> 	lpr -P{low,med,high}
> 
> For that purpose I need three more entries in printcap, that differ
> in the name of the input filter, since apsfilter features like
> print density are invoked by calling apsfilter (the input filter)
> by different names, but share the same spooldir.
> 
> But this happens when starting up lpd:
>  root{154} /usr/src lpd
> chkprintcap: lp8 and lp7 share the same spool, /var/spool/lpd/stcolor-a4-auto-color
> chkprintcap: lp7 and lp6 share the same spool, /var/spool/lpd/stcolor-a4-auto-color
> chkprintcap: lp6 and lp share the same spool, /var/spool/lpd/stcolor-a4-auto-color
> lpd: 3 errors in printcap file, exiting
> 
> Would it be safe, to modify lpd to tolerate this and only printing
> out a warning ... ?!
> 
> 	Andreas ///
> 
> printcap entry for reference, see "^^^^^^^^^"
> 
> 
> # LABEL apsfilter
> # apsfilter setup Sun May 23 17:27:14 CEST 1999
> #
> # APS_BASEDIR:/usr/local/apsfilter
> #
> #
> ascii|lp1|stcolor-a4-ascii-mono|stcolor ascii mono:\
> 	:lp=/dev/lpt0:\
> 	:sd=/var/spool/lpd/stcolor-a4-ascii-mono:\
> 	:lf=/var/spool/lpd/stcolor-a4-ascii-mono/log:\
> 	:af=/var/spool/lpd/stcolor-a4-ascii-mono/acct:\
> 	:if=/usr/local/apsfilter/filter/aps-stcolor-a4-ascii-mono:\
> 	:mx#0:\
> 	:sh:
> #
> lp2|stcolor-a4-auto-mono|stcolor auto mono:\
> 	:lp=/dev/lpt0:\
> 	:sd=/var/spool/lpd/stcolor-a4-auto-mono:\
> 	:lf=/var/spool/lpd/stcolor-a4-auto-mono/log:\
> 	:af=/var/spool/lpd/stcolor-a4-auto-mono/acct:\
> 	:if=/usr/local/apsfilter/filter/aps-stcolor-a4-auto-mono:\
> 	:mx#0:\
> 	:sh:
> #
> lp3|stcolor-a4-ascii-color|stcolor ascii color:\
> 	:lp=/dev/lpt0:\
> 	:sd=/var/spool/lpd/stcolor-a4-ascii-color:\
> 	:lf=/var/spool/lpd/stcolor-a4-ascii-color/log:\
> 	:af=/var/spool/lpd/stcolor-a4-ascii-color/acct:\
> 	:if=/usr/local/apsfilter/filter/aps-stcolor-a4-ascii-color:\
> 	:mx#0:\
> 	:sh:
> #
> lp|lp4|stcolor-a4-auto-color|stcolor auto color:\
> 	:lp=/dev/lpt0:\
> 	:sd=/var/spool/lpd/stcolor-a4-auto-color:\
> 	:lf=/var/spool/lpd/stcolor-a4-auto-color/log:\
> 	:af=/var/spool/lpd/stcolor-a4-auto-color/acct:\
> 	:if=/usr/local/apsfilter/filter/aps-stcolor-a4-auto-color:\
> 	:mx#0:\
> 	:sh:
> #
> raw|lp5|stcolor-a4-raw|stcolor auto raw:\
> 	:lp=/dev/lpt0:\
> 	:sd=/var/spool/lpd/stcolor-raw:\
> 	:lf=/var/spool/lpd/stcolor-raw/log:\
> 	:af=/var/spool/lpd/stcolor-raw/acct:\
> 	:if=/usr/local/apsfilter/filter/aps-stcolor-a4-raw:\
> 	:mx#0:\
> 	:sh:
> #
> lp6|low|stcolor 180dpi low resolution:\
> 	:lp=/dev/lpt0:\
> 	:sd=/var/spool/lpd/stcolor-a4-auto-color:\
>                            ^^^^^^^^^^^^^^^^^^^^^ same spooldir needed
> 	:lf=/var/spool/lpd/stcolor-a4-auto-color/log:\
> 	:af=/var/spool/lpd/stcolor-a4-auto-color/acct:\
> 	:if=/usr/local/apsfilter/filter/aps-stcolor-a4-auto-color-180x180:\
>                                                                   ^^^^^^^^
> 	:mx#0:\
> 	:sh:
> #
> lp7|med|stcolor 360dpi medium resolution:\
> 	:lp=/dev/lpt0:\
> 	:sd=/var/spool/lpd/stcolor-a4-auto-color:\
>                            ^^^^^^^^^^^^^^^^^^^^^ same spooldir needed
> 	:lf=/var/spool/lpd/stcolor-a4-auto-color/log:\
> 	:af=/var/spool/lpd/stcolor-a4-auto-color/acct:\
> 	:if=/usr/local/apsfilter/filter/aps-stcolor-a4-auto-color-360x360:\
>                                                                   ^^^^^^^^
> 	:mx#0:\
> 	:sh:
> #
> lp8|high|stcolor 720dpi high resolution:\
> 	:lp=/dev/lpt0:\
> 	:sd=/var/spool/lpd/stcolor-a4-auto-color:\
>                            ^^^^^^^^^^^^^^^^^^^^^ same spooldir needed
> 	:lf=/var/spool/lpd/stcolor-a4-auto-color/log:\
> 	:af=/var/spool/lpd/stcolor-a4-auto-color/acct:\
> 	:if=/usr/local/apsfilter/filter/aps-stcolor-a4-auto-color-720x720:\
>                                                                   ^^^^^^^^
> 	:mx#0:\
> 	:sh:
> 
> 
> -- 
> Andreas Klemm                               http://www.FreeBSD.ORG/~andreas
>                                   http://www.freebsd.org/~fsmp/SMP/SMP.html
>                                 powered by Symmetric MultiProcessor FreeBSD
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-hackers" in the body of the message

-- 
work: danderse@cs.utah.edu                     me:  angio@pobox.com
      University of Utah                            http://www.angio.net/
      Computer Science - Flux Research Group   "What's footnote FIVE?"


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14156.10638.531747.843524>