[H-GEN] Samba on SuSE 8.1
Jason Parker-Burlingham
jasonp at uq.net.au
Wed May 7 18:43:07 EDT 2003
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
Alex Delaforce <alextdel at bigpond.net.au> writes:
> 2. In configuring the daemon processes for Samba I have:
> A. Created a file called rc.samba which I have put into
> /etc/init.d/
> The file contains
> #!/bin/sh
> /usr/local/samba/bin/smbd -D
> /usr/local/samba/bin/nmbd -D
> B. Within /etc/int.d/rc5.d created a symbolic link called
> S20samba that points to the rc.samba file in /etc/init.d
>
> The book Samba Unleashed indicated that I now can reboot and the thing
> should work.
> BUT......
> I'm a bit confused:
> Question - how does the file S20samba get run at boot time? Is
> everything in rc.5 run as linux reaches run level 5?
It's run by a process started by init. On my Debian system it is
"/etc/init.d/rc". On your system it'll be a bit different, look in
/etc/inittab.
> Question - how does the symbolic link indicate to the samba daemon file
> that it is being started or stopped? The symbolic links 'SxxFileNames'
> and 'KxxFilenames' within the rc.x directories seem to point to the same
> files without any parameters being passed on.
You answered your own question although you don't know it.
All the symlinks are named with an S or K, then two digits. "S" (for
start) scripts (remember that the init script infrastructure doesn't
really know "S20samba" isn't a normal file) are run when entering the
runlevel, "K" scripts (for kill) are run when leaving it for some
other runlevel.
The numbers help the rc script sort the S or K scripts so they run in
a well-defined order; it means you can put S21samba-fu in place and
have it run after samba starts.
I hope this answers at least some of your questions.
--
``Oooh! A gingerbread house! Hansel and Gretel are set for life!''
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'. See http://www.humbug.org.au/
More information about the General
mailing list