[Pkg-samba-maint] Samba start stop script does not check for configuration file
Steve Langasek
vorlon at debian.org
Thu Apr 2 09:27:40 UTC 2009
On Thu, Mar 26, 2009 at 10:54:37AM +0100, Jacob.Van.Der.Meulen at esa.int wrote:
> Is it possible to add to the samba start stop script a check for the
> existence of the samba configuration file like you do for checking the
> existence of the daemons?
No. Checking for the existence of the daemons is done to ensure that the
script is treated as a no-op in the case that the package is removed but not
purged; I don't consider exiting non-zero when the smb.conf is absent to be
a reasonable extension of this principle.
> Suggestion for /etc/init.d/samba:
> Change:
> test -x /usr/sbin/nmbd -a -x /usr/sbin/smbd || exit 0
> by
> test -x /usr/sbin/nmbd -a -x /usr/sbin/smbd -a -r /etc/samba/smb.conf ||
> exit 0
> On my high available cluster (fail-over) I want to have samba running on the
> active node only. So my /etc/samba is a link to a shared location which is
> only accessible from the active node. With the proposed check the Samba
> start-up trial on the not active node will not generate a failure.
The startup script is a conffile, so you could simply edit that script if
this is what you want; I have to say that I don't think it's a very elegant
solution for HA, though.
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek at ubuntu.com vorlon at debian.org
More information about the Pkg-samba-maint
mailing list