[H-GEN] Samba on SuSE 8.1

Michael Anthon michael at anthon.net
Wed May 7 10:51:35 EDT 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

From: "Alex Delaforce" <alextdel at bigpond.net.au>
> 1.I have done all the steps given to install from source (my first
> install of source files - any files actually) according to the book
> 'Samba Unleashed'. However, when I reboot I can't tell if the server is
> running.
Why use the source?  Surely Suse has a precompiled package?  As a learning
exercise I wouldn't be starting with a self built version since a prebuilt
one is more likely to work.

> What is the quickest way to find out if the server is running. It is set
> up as a daemon. I've tried using 'ps -a'. It gives a fairly long list
> but doesn't seem to show some services that I know are running. I
> therefore don't feel overly in control of what it is reporting.

try 'ps auxww | grep smb'.  (see man ps for more juicy details)

> 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

At a quick glance this would probably work but it lacks a few features
normally included in the init scripts (another reason for using a package
since that will provide a full blown init script).

> Question - how does the file S20samba get run at boot time? Is
> everything in rc.5 run as linux reaches run level 5?
> 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.

Have a look for a file /etc/init.d/README, this *should* exist and either
explain the system or provide links to documentation that does.  Essentially
though the sysv init process will first look in /etc/rcS.d.  Scripts
starting with Snn are run with the parameter start, so in your example,
S20samba links to /etc/init.d/rc.samba which would be executed as
'/etc/init.d/rc.samba start'.  Scripts starting with K are stopped (killed
if I'm not mistaken), e.g. '/etc/init.d/rc.samba stop'.  This relates back
to my earlier comment about the init script being incomplete, it should at
the least handle that start and stop parameters.  The number (nn) indicates
the sequence of execution, going from lowest to highest.  Off the top of my
head I can't recall if it runs through all the K scripts or all the S
scripts first.

Ahh, debian policy document...
"When init changes runlevel first the targets of the links whose names start
with a K are executed, each with the single argument stop, followed by the
scripts prefixed with an S, each with the single argument start. (The links
are those in the /etc/rcn.d directory corresponding to the new runlevel.)
The K links are responsible for killing services and the S link for starting
services upon entering the runlevel. "


> PS. I am impressed with the level of help I have been given in the past
> and the amount of time that list members will give to people such as
> myself. It's a credit to the motivation and level of knowledge of those
> involved. Keep it up.......please.

Hehe, gratuitous fawning and boot licking, I like it !

Cheers
Michael


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