[SCM] SAMBA-CTDB repository - branch v3-2-ctdb updated - 3.2.11-ctdb-64-7-g37c96bf

Michael Adam obnox at samba.org
Tue Sep 22 08:15:54 MDT 2009


The branch, v3-2-ctdb has been updated
       via  37c96bfab0db72fe1811b5c6b0da0c28a9c4ca5f (commit)
      from  d4d46eb394e15035783cacbe150d3c8638c68f19 (commit)

http://gitweb.samba.org/?p=obnox/samba-ctdb.git;a=shortlog;h=v3-2-ctdb


- Log -----------------------------------------------------------------
commit 37c96bfab0db72fe1811b5c6b0da0c28a9c4ca5f
Author: Michael Adam <obnox at samba.org>
Date:   Tue Sep 22 14:26:35 2009 +0200

    packaging(RHEL-CTDB): control starting of nmbd via START_NMBD from /etc/sysconfig/samba
    
    Michael

-----------------------------------------------------------------------

Summary of changes:
 packaging/RHEL-CTDB/setup/samba.sysconfig |    2 ++
 packaging/RHEL-CTDB/setup/smb.init        |   19 +++++++++----------
 2 files changed, 11 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/packaging/RHEL-CTDB/setup/samba.sysconfig b/packaging/RHEL-CTDB/setup/samba.sysconfig
index 944b72f..84480f6 100644
--- a/packaging/RHEL-CTDB/setup/samba.sysconfig
+++ b/packaging/RHEL-CTDB/setup/samba.sysconfig
@@ -4,3 +4,5 @@ SMBDOPTIONS="-D"
 NMBDOPTIONS="-D"
 # Options for winbindd
 WINBINDOPTIONS=""
+# start nmbd? yes/no
+START_NMBD=no
diff --git a/packaging/RHEL-CTDB/setup/smb.init b/packaging/RHEL-CTDB/setup/smb.init
index 4dd5b23..cb893c1 100644
--- a/packaging/RHEL-CTDB/setup/smb.init
+++ b/packaging/RHEL-CTDB/setup/smb.init
@@ -24,10 +24,17 @@ unset TMPDIR
 # Source networking configuration.
 . /etc/sysconfig/network
 
+# Don't start NMBD by default.
+# This can be overridden in /etc/sysconfig/samba .
+START_NMBD="no"
+
 if [ -f /etc/sysconfig/samba ]; then
    . /etc/sysconfig/samba
 fi
 
+# be friendly - convert the value to lower case
+START_NMBD=$(echo $START_NMBD | tr A-Z a-z)
+
 # Check that networking is up.
 [ ${NETWORKING} = "no" ] && exit 0
 
@@ -37,14 +44,6 @@ fi
 # Check that we can write to it... so non-root users stop here
 [ -w /etc/samba/smb.conf ] || exit 0
 
-# Check whether "netbios disabled" is true
-#ISNETBIOSDISABLED=$(testparm -s 2>/dev/null | \
-#	sed -n '/\[global\]/,/^$/p' | \
-#	grep "disable netbios = Yes" | \
-#	awk 'BEGIN{FS=" = "}{print $2}')
-
-ISNETBIOSDISABLED=Yes
-
 RETVAL=0
 
 
@@ -55,7 +54,7 @@ start() {
 	RETVAL=$?
 	echo
 	KIND="NMB"
-	if [ x"$ISNETBIOSDISABLED" != x"Yes" ]; then
+	if [ x"$START_NMBD" = x"yes" ]; then
 		echo -n $"Starting $KIND services: "
 		daemon nmbd $NMBDOPTIONS
 		RETVAL2=$?
@@ -77,7 +76,7 @@ stop() {
 	[ $RETVAL -eq 0 ] && rm -f /var/run/smbd.pid
 	echo
 	KIND="NMB"
-	if [ x"$ISNETBIOSDISABLED" != x"Yes" ]; then
+	if [ x"$START_NMBD" = x"yes" ]; then
 		echo -n $"Shutting down $KIND services: "
 		killproc nmbd 
 		RETVAL2=$?


-- 
SAMBA-CTDB repository


More information about the samba-cvs mailing list