[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#228542: lpd lock file location violates FHS (and LSB)



On Tue, Jan 27, 2004 at 11:06:18AM -0500, Jeff Licquia wrote:
> Adam Majer wrote:
> >Wait a minute - this doesn't make any sense.
> >
> >The lpr.pid is the PID file, not the lock file.
> >
> >The lock file is in the spool directory AFAICT and it is called lock.
> 
> That could be, though I don't remember seeing even the lock file there. 
>  (I don't have access to the test machine at the present.)
> 
> It may be that the FHS is referring to the PID file, or that the LSB is 
> (mis)interpreting the FHS to mean the PID file.  I know that the 
> original name of the PID file in upstream's source is lpd.lock, although 
> it's in a different place.  The symbol name in the source even refers to 
> it as a lock file.  (_PATH_MASTERLOCK in common_source/pathnames.h)
> 
> At any rate, the LSB test requires that /var/spool/lpd/lpd.lock exist at 
> all times when lpd is running.


Then I'll have to file a serious bug againt initscripts so that this pid
file (lock file) gets removed during boot.

I can only fix lpr once initscripts gets fixed. Otherwise you'll end up
with stale lpd lock files.


My understanding is that FHS is either contradictory or it allows for BOTH:
The lpd pid file in /var/run or /var/spool/lpd.


http://www.pathname.com/fhs/2.2/fhs-5.13.html

   5.13.1 Purpose (/var/run)
   This directory contains system information data describing the system since it was booted.
   Files under this directory must be cleared (removed or truncated as appropriate) at the 
   beginning of the boot process.

Now this alone makes sense to me to put the "lock" (PID) file for lpd in /var/run.


http://www.pathname.com/fhs/2.2/fhs-5.14.html

	(/var/spool/lpd)
   The lock file for lpd, lpd.lock, must be placed in /var/spool/lpd


This is stupid and makes no sense. /var/spool/lpd is NOT cleaned during
boot but the daemon uses a PID file for locking purposes. If a system crashes,
lpd will (should) not start since the /var/spool/lpd is "locked".

I'm inclined to just leave the PID file in the /var/run - this is the place
for PID files. 5.14.3 can be satisifed by saying that lpd in Debian doesn't
have a lock file. OR I can just add a dummy file in the lpr source to act
as a lock file.

If I have to move the pid file to /var/spool/lpd, then initscripts has to change
as well.

Any comments, suggestions?

- Adam



Reply to: