LPRng creates a pid file as /var/run/lpd.printer This is incorrect. All scripts from /etc/rc.d/init.d/functions are looking for a file /var/run/lpd.pid Change process file name to a standard one.
I see the issue, but I cannot find the pid code. Will fix later.
It uses lockfile.port lock file format. grep on Lockfile_DYN grep Lockfile_DYN src/*/* and in all places where path = safestrdup3( Lockfile_DYN,".", Lpd_port_DYN, __FILE__, __LINE__ ); replace Lpd_port_DYN to "pid"
There is to much magic associated with this file for me to want to touch it right before a release. Specifically, what happens if there are more than one spooler (which is posible with LPRng). I will send a request to the upstream maintainer on this, but I'm closing it for now, as it's control script does some other magic to find the pid.
The replacement of Lpd_port_DYN to "pid" will work fine while you have lpd working with a single port (printer=515). The Lpd_port_DYN is just a string "printer" when printer port is 515, or string representing port number otherwise. The program will not work if one started two or more lpd which sit on different ports. But from /etc/rc.d/init/lpd you can not do this anyway. doing grep Lockfile_DYN src/*/* src/common/checkpc.c: if( Lockfile_DYN == 0 ){ src/common/checkpc.c: path = safestrdup3( Lockfile_DYN,".", Lpd_port_DYN, __FILE__, __LINE__ ); src/common/lpd.c: if( Lockfile_DYN == 0 ){ src/common/lpd.c: path = safestrdup3( Lockfile_DYN,".", Lpd_port_DYN, __FILE__, __LINE__ ); src/common/lpd.c: path = safestrdup3( Lockfile_DYN,".", Lpd_port_DYN, __FILE__, __LINE__ ); src/common/vars.c:{ "lockfile", STRING_K, &Lockfile_DYN,1,0,"=" LOCKFILE}, src/include/lp.h:EXTERN char* Lockfile_DYN; There are 3 places affected: two in lpd.c and one in checkpc.c