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

Re: samba question *Solved*



Michelle Storm wrote:

being a lazy sys admin i like rcconf install it using : apt-get install rcconf
run it and just choose what you wish to run and what not .
Moti

Thanks, worked wonderfully. Glad I did it this way. The other way would
have been a pain.. (if I'm reading this correctly, there were 7 spots to
modify to stop samba from auto-loading)

update-rc.d: /etc/init.d/samba exists during rc.d purge (continuing)
Removing any system startup links for /etc/init.d/samba ...
  /etc/rc0.d/K19samba
  /etc/rc1.d/K19samba
  /etc/rc2.d/S20samba
  /etc/rc3.d/S20samba
  /etc/rc4.d/S20samba
  /etc/rc5.d/S20samba
  /etc/rc6.d/K19samba

Thanks to all that replied.
Actually, the K scripts Kill the process (when switching runlevels, etc), and the S scripts start the process. So if you were to switch to runlevel 1, the "/etc/rc1.d/K19samba" script would kill the samba process. When you boot up normally (runlevel 2 on a default Debian install), the "/etc/rc2.d/S20samba" script would start the samba process, after running any scripts that come alphanumerically before "S20samba", such as "S19foo" of "S3whatever" or "S20saab" (because "saa" comes before "sam"). These are just symbolic links that point back to the real script "/etc/init.d/samba".

When you boot, the kernel loads, then runs init, using /etc/inittab as init's configuration file. /etc/inittab specifies runlevel 2 as the default ("id:2:initdefault"), which lower in the file causes init to run "/etc/init.d/rc 2". The "/etc/init.d/rc" script then does its thing on runlevel 2, since 2 was fed to it as a parameter. It's "thing" is to run all the K scripts in whatever runlevel directory with the "stop" parameter, and then to run the S scripts in the "/etc/rc2.d" directory with the "start" parameter. Complicatedly simple, huh?

Anything that breaks the process would have stopped samba from running. For example: * rename "/etc/rc2.d/S20samba" to "/etc/rc2.d/NoS20samba" or better "/etc/rc2.d/K20samba" * move the "/etc/rc2.d/S20samba" to another location such as "/etc/rc2.d/DELETED"
* delete "/etc/rc2.d/S20samba" manually
* delete or move "/etc/init.d/samba"
* apt-get --purge remove samba
* add the line "exit 0" as the first executable of the "/etc/init.d/samba" script * use the tool that modifies the scripts for you, which is often mentioned on this list, but which I can _never_ remember the name of nor the syntax, as demonstrated by the fact that I didn't name it here, nor did I find any clues just now with "apt-cache search" or "apropos"
* use rcconf, like you did
* stop samba manually after the boot process has started it, with a command like "/etc/init.d/samba stop" * boot into a runlevel that doesn't start samba; for example at the lilo prompt, "linux S' to boot into single user mode
* etc

Just FYI.

Kent




Reply to: