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

Re: Getting Linux to start a few daemons , I want , at startup



Shyam <shyamk@eth.net> wrote:

> I wish to run  /etc/rc.d/init.d/smb start , at a run-level , 
> say run-level 5 (so far , it has not been assossiated with any run-level) .,
> and /etc/rc.d/init.d/smb stop , while shutting down .
> 
> I understand that I might need  Start and Kill scripts ,
> for this at the runlevel , I am looking at.
> 
> My doubts  are : 
> Is my thinking in the right direction ? 

I don't think you are thinking entirely correctly.  For starters, the
terminology you used above indicates you are "thinking" in terms of the
Red Hat SYSV-Init schema.  Debian does it differently...the /etc/rc.d/
directory does not exist in Debian!  I suggest you read the Debian
Policy Manual on the SysV-Init stuff and explore your system (the /etc
directory) to fully understand how Debian handles the Start - Stop
initscripts on bootup.  This knowledge is a fundamental part of being
able to de-bug problems you might have in Debian, IMHO.

> Is there anything else , that I need to do ,
> so that while Linux is coming up , I get :
> --snip-- <

Most Debian packages that require some sort of "start - stop"
functionality come with an initscript that is automatically placed in
the /etc/init.d/ directory, AND the package will also install a set of
calls to its initscript at the appropriate run-levels AUTOMATICALLY. 
The various run-levels are controlled by the symlinks in the /etc/rc?.d/
directories, where the "?" indicates run-levels from 0 to 6.  The
/etc/rcS.d/ symlinks are run once on bootup, before it jumps to your
final run-level directory.  Generally, these are prepared by the package
developer/maintainer, and work quite well for most circumstances.  You
rarely need to change anything, IMHO.  The most you should have to do is
remove some symlinks to the "start-stop" initscript at the runlevels you
DON'T want it to run, or add these symlinks at the levels you DO want. 
If you are not familiar with the way Debian does this, I suggest you NOT
mess with the default setup until you understand and know EXATLY what
you are doing.

In the case of the Debian SAMBA package, it too will install the proper
"start-stop" initscript in /etc/init.d/.  Take a look and I will bet you
will see it there, if you installed SAMBA from a "deb" package.  The
messages you are seeing on startup indicate you are probably using it
already....but I dunno for sure.

SAMBA comes with an option to be started via the "start-stop"
initscripts, as you are probably already doing, OR it can be run as a
daemon under inetd, and will be started upon demand.  The "start-stop"
method means that the nmbd and smbd daemons are running all the time and
will have a slightly faster response time.  When run in the inetd daemon
mode, it will free up a bit of memory space, but will have a slightly
slower response.  The differences are minimal, IMHO.  It makes sense to
have them up all the time if your SAMBA is acting as a WINS server for a
network of several machines, otherwise you can choose the inetd mode. 
This can be re-configured anytime by running the command "sambaconfig"
as root.

I hope this will get you headed in the right direction.

Cheers,
-Don Spoon-



Reply to: