[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Wed Sep 17 05:17:04 MDT 2014


The branch, master has been updated
       via  2df601b nmbd: Send waiting status to systemd.
       via  9f5f5fa lib: Add daemon_status() to util library.
      from  22257dd ctdb-scripts: Do not export variables if they are not set

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 2df601bff0d949e66c79366b8248b9d950c0b430
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Sep 16 18:03:51 2014 +0200

    nmbd: Send waiting status to systemd.
    
    This tells the Administrator what's going on and we should log that IPv6
    is not supported.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=10816
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>
    
    Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date(master): Wed Sep 17 13:16:43 CEST 2014 on sn-devel-104

commit 9f5f5fa8ebf845c53b7a92557d7aec56ed820320
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Sep 16 18:02:30 2014 +0200

    lib: Add daemon_status() to util library.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=10816
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>

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

Summary of changes:
 lib/util/become_daemon.c     |   11 +++++++++++
 lib/util/samba_util.h        |    6 ++++++
 source3/nmbd/nmbd_subnetdb.c |    7 +++++--
 3 files changed, 22 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/become_daemon.c b/lib/util/become_daemon.c
index 17e0baf..78bebfc 100644
--- a/lib/util/become_daemon.c
+++ b/lib/util/become_daemon.c
@@ -123,3 +123,14 @@ _PUBLIC_ void daemon_ready(const char *name)
 	DEBUG(0, ("STATUS=daemon '%s' finished starting up and ready to serve "
 		  "connections\n", name));
 }
+
+_PUBLIC_ void daemon_status(const char *name, const char *msg)
+{
+	if (name == NULL) {
+		name = "Samba";
+	}
+#ifdef HAVE_SYSTEMD
+	sd_notifyf(0, "\nSTATUS=%s: %s", name, msg);
+#endif
+	DEBUG(0, ("STATUS=daemon '%s' : %s", name, msg));
+}
diff --git a/lib/util/samba_util.h b/lib/util/samba_util.h
index a8d3cd6..ec939cc 100644
--- a/lib/util/samba_util.h
+++ b/lib/util/samba_util.h
@@ -852,6 +852,12 @@ _PUBLIC_ void exit_daemon(const char *msg, int error);
 **/
 _PUBLIC_ void daemon_ready(const char *daemon);
 
+/*
+ * Report the daemon status. For example if it is not ready to serve connections
+ * and is waiting for some event to happen.
+ */
+_PUBLIC_ void daemon_status(const char *name, const char *msg);
+
 /**
  * @brief Get a password from the console.
  *
diff --git a/source3/nmbd/nmbd_subnetdb.c b/source3/nmbd/nmbd_subnetdb.c
index 311a240..6c483af 100644
--- a/source3/nmbd/nmbd_subnetdb.c
+++ b/source3/nmbd/nmbd_subnetdb.c
@@ -247,8 +247,11 @@ bool create_subnets(void)
 
 	/* Only count IPv4, non-loopback interfaces. */
 	if (iface_count_v4_nl() == 0) {
-		DEBUG(0,("create_subnets: No local IPv4 non-loopback interfaces !\n"));
-		DEBUG(0,("create_subnets: Waiting for an interface to appear ...\n"));
+		daemon_status("nmbd",
+			      "No local IPv4 non-loopback interfaces "
+			      "available, waiting for interface ...");
+		DEBUG(0,("NOTE: NetBIOS name resolution is not supported for "
+			 "Internet Protocol Version 6 (IPv6).\n"));
 	}
 
 	/* We only count IPv4, non-loopback interfaces here. */


-- 
Samba Shared Repository


More information about the samba-cvs mailing list