> From [EMAIL PROTECTED] Thu Sep 11 18:33:17 2003
> Date: Fri, 12 Sep 2003 10:07:39 +1000
> To: [EMAIL PROTECTED]
> Subject: LPRng: An interesting idea for lprng
> From: [EMAIL PROTECTED] (Craig Small)
>
> Hello Patrick,
>   Here is an interesting but strange idea.  Something for those times
> when you wonder what wackyness you can get lprng to do in your spare
> moments :)
>
> Needless to say, while the idea has merit, occassional users probably
> should use something more lightweight.
>
> ref: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=199094
>
> Dmitry Rutsky <[EMAIL PROTECTED]> reported:
> > I think there should be a way to start the daemon only when it is needed.  Of
> > course, constant run is completely acceptable for servers, but for a home
> > computer, where printing is occasional and rare, most of the time it is just
> > a redundant process slot, about 350K of virtual memory and bootup entry. Not
> > very much to worry about, though.
> > 
> > I couldn't figure out how to do it from the lprng documentation.  AFAIK, all
> > thegood daemons which perform server functions for occasional tasks can run via
> > inetd;  lpd doesn't seem to be able to do so.
>
>  - Craig
>
> -- 
> Craig Small      GnuPG:1C1B D893 1418 2AF4 45EE  95CB C76C E5AC 12CA DFA5
> Eye-Net Consulting http://www.enc.com.au/   MIEE         Debian developer
> csmall at : enc.com.au                      ieee.org           debian.org 


One of the problems  that other severs do not have to deal with is
restarting operations.  The print spooler is considered broken
if, after rebooting, printing of jobs in the spool queue are not
automatically started.

After several years and (literally) hundreds of queiries about this
I ripped out the inetd support in the old PLP software.

Having said this,  if you want to add it, do the folllwing:

a) /etc/lpd.conf - set unix_socket_path to 'no' or '' to
   suppress the use of the Unix socket (/var/run/lpd)

b) add a '-i' option oto lpd.c that will cause:
    fd 1, 2 to be opened to /dev/null
    dup fd 0 to Listen_FD
    close fd 0 and dup fd 1 to fd 0
    skip the socket/bind/listen for the TCP/IP lpd listen
    socket.

    Remove the lpd startup code from wherever it is hiding.
    Add entry to /etc/inetd  with 'wait' for the mode, and -i option.

    killall lpd
    killall -HUP inetd   (or killal -pHUP xinetd)

    Test. Rinse. Repeat. Reboot. Test. Rinse... etc.


Good luck.  If you do this,  perhaps you can post patches
and some documentation.  Then if other folks want to do
this,  we can have some information for them.


-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------

Reply via email to