[Re: [Re: [Samba] Won't Start Automatically]]]
E E Hines
eehines at comcast.net
Tue Mar 1 03:12:22 GMT 2005
My other source of info is the O'Reilly book _Using Samba_ by Ts, Eckstein,
and Collier-Brown. In Chapter 2, they say that the kills--the Kxxservices--
are always run first, then the Startups--the Sxxservice--are run. They're not
explicit on the numbering, but they imply that lower numbers are always run
before higher numbers. Finally, their example explicitly has the reader
generating soft links to S35smb (smb is the samba start/stop script in their
example and in my case) and to K35smb. They do point out that the idea is
to have samba start after all the services it needs have started and to stop
before any of the services it needs are stopped. Also, in my case, there was
no soft link, of any number, to start smb until I added it. The sample smb
that came with my installation, by the way, had chkconfig giving it a start of
91 and a stop of 35.
As to chkconfig, I confess to not understanding, apparently, the instructions in
the man pages. When I run "chkconfig --add smb" to add smb to runlevels 3 and 5,
(per the commented chkconfig support lines in smb), it's obviously getting smb to
run on bootup (I've removed the soft links I made, my earlier remarks notwithstanding)
but I see no soft links in the /etc/rc.d/rc3.d or ../rc5.d directories. From where are
they being run?
>Subject: Re: [Fwd: Re: [Fwd: Re: [Samba] Won't Start Automatically]]
>>Actually, my problem turns out to be even more basic and foolish than
>>that. I assumed that since the relevant Kill files were present in the
>>ls listing, then the Start files would be, too. Nope. I had to make
>>those soft links; when I did, everything worked properly.
>Then perhaps you still need to read up on how the startup scripts work, at
>least on Fedora. The startup routine runs every link in the rcX.d
>directory that has either an S or a K in the order determined by the
>number contained in the name. On entering a runlevel, if the link is a
>KXXservice then it runs the service with the stop argument, if the link is
>a SXXservice then it runs it with a start, the order is from low numbers
>to high. This procedure is reversed on leaving a runlevel, the S = stop,
>the K = start (I believe) and the numerical order goes from high to
>low. I need to read up on the docs myself since I cant tell you if it
>does kills then starts or if it does all the numbers in order regardless
>of the argument. I believe it is the former though.
>The fact that samba works for you is a wonderful coincidence. By most
>accounts, the default setup for samba is a K35/S65. In your setup that
>means that samba gets killed and then started, leaving you with a running
>system. If you had to change to another runlevel and expected samba to be
>stopped you'd be in for a surprise.
>This is exactly the reason that somebody made chkconfig, it keeps stuff
>like this from happening. It also follows the convention that when a
>service is switched from stop to start and vice versa, the number given to
>it is 100-<whatever the old number was>, which is why samba is usually a
>>>>Running FC3, kernel 2.6.9-1.667.i686, Samba v 3.0.11.
>>>>I have been able to guts up Samba by adding a procedure
>>>>to /etc/rc.d/rc.local, but I can't get the system to start from
>>>>the /etc/rc.d/rcx.d directories. I have an smb script
>>>>in /etc/rc.d/init.d that is soft-linked from the rcx.d directories, and
>>>>that runs just fine when I invoke it from the command line, but
>>>>apparently the rcx.d links aren't getting called at all.
>>>>Any suggestions would be greatly appreciated.
More information about the samba