From wayne@barnes1.wustl.edu  Wed Dec  3 13:20:24 1997
Received: from barnes1.wustl.edu (barnes1.wustl.edu [128.252.162.58])
          by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id NAA14281
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 3 Dec 1997 13:20:20 -0800 (PST)
          (envelope-from wayne@barnes1.wustl.edu)
Received: (from wayne@localhost) by barnes1.wustl.edu (8.8.7/8.7.3) id OAA02801; Wed, 3 Dec 1997 14:46:41 -0600 (CST)
Message-Id: <199712032046.OAA02801@barnes1.wustl.edu>
Date: Wed, 3 Dec 1997 14:46:41 -0600 (CST)
From: "Wayne M. Barnes" <wayne@barnes1.wustl.edu>
Reply-To: wayne@barnes1.wustl.edu
To: FreeBSD-gnats-submit@freebsd.org
Subject: lpd bug
X-Send-Pr-Version: 3.2

>Number:         5206
>Category:       bin
>Synopsis:       lpr looks in wrong place for spool, and boot message 'duplicate spool directory'
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec  3 13:30:00 PST 1997
>Closed-Date:    Fri May 8 13:54:54 PDT 1998
>Last-Modified:  Fri May  8 13:55:48 PDT 1998
>Originator:     Wayne M. Barnes
>Release:        FreeBSD 2.2.5-RELEASE i386  also -CURRENT
>Organization:
Washington University
>Environment:

    Recent upgrade from 2.2.1 to 2.2.5, by doing a make world and fresh kernel
    On another machine, cvsup and same, to get FreeBSD-CURRENT
	

>Description:

	


At boot up, a message complains that there are multiple spool files
for lpd, and one is named: /var/spool/output/lpd

The other one is not named, but there is a file /var/spool/lpd

I have tried mv'ing each of these lpd directories in turn, but I
still can't print.  

With one of the directories existing, [ /var/spool/output/lpd ]
the "job is spooled, but daemon can't start"

The first part of my /etc/printcap is:

lp|Local Printer:\
	:sh:sd=/var/spool/lpd:\
	:lp=/dev/lpt0:\
	:if=/usr/local/libexec/if-simple:\
	:lf=/var/log/lpd

So you can see that the correct spool directory is /var/spool/lpd
I used to be able to print just fine, with this printcap file.  Now, I can't.
>How-To-Repeat:

CLEAN START with only /var/spool/lpd
rm -r /var/spool/lpd*
rm -r /var/spool/output*
mkdir /var/spool/lpd
reboot
RESULT:
... lpd[134]: /var/spool/output/lpd.lock: No such file or directory.

[ I believe the system was supposed to put this into the spool
  directory I specified in my printcap file, namely /var/spool/lpd  
  So why is it even looking for the output directory?  ]

OKAY, CREATE the "output" directory, empty:
mkdir /var/spool/output
reboot
RESULT:
Dec  3 12:45:53 barnes3 lpd[134]: startup: duplicate spool directories: /var/spool/output/lpd
CLEAN START WITH ONLY /var/spool/output
rm -r /var/spool/lpd*
rm -r /var/spool/output*
mkdir /var/spool/output
reboot
RESULT:
Dec  3 12:57:55 barnes3 lpd[134]: startup: duplicate spool directories: /var/spool/output/lpd

ls -laF /var/spool/output
total 3
drwxrwxr-x   2 root  bin  512 Dec  3 12:57 ./
drwxr-xr-x  11 bin   bin  512 Dec  3 12:53 ../
-rw-r--r--   1 root  bin    4 Dec  3 12:57 lpd.lock
	

>Fix:
        Beats me.  Please help.

	It looks like some code expects the spool directories
to be in /var/spool/output, instead of inspecting the printcap file.

        It didn't do this for FreeBSD 2.2.1
	
	

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: max 
Responsible-Changed-When: Fri Dec 5 07:10:26 PST 1997 
Responsible-Changed-Why:  
Misfiled PR. 
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Fri May 8 13:54:54 PDT 1998 
State-Changed-Why:  
the trick is that all your printers must have their own  
unique "sd=" setting 
>Unformatted:
