New options that control whether dbus and Tracker are started
authorRalph Boehme <sloowfranklin@gmail.com>
Thu, 22 May 2014 11:16:02 +0000 (13:16 +0200)
committerRalph Boehme <rb@sernet.de>
Thu, 22 May 2014 11:20:27 +0000 (13:20 +0200)
'start dbus' and 'start tracker', both default to yes, FR#91

Signed-off-by: Ralph Boehme <sloowfranklin@gmail.com>
NEWS
doc/manpages/man5/afp.conf.5.xml
etc/netatalk/netatalk.c
man/man5/afp.conf.5.in

diff --git a/NEWS b/NEWS
index f6fd71a1fd52d26eb67d76757a7cdc004bce141a..c465335e3bbdcde37cacee43e06a5f90ac79f2ab 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,8 @@ Changes in 3.1.2
        definitions. FR#90.
 * FIX: getvolbypath returns incorrect volume, bug #563
 * FIX: fd leak when using appledouble = v2, bug #554
+* UPD: New options that control whether dbus and Tracker are started:
+       'start dbus' and 'start tracker', both default to yes, FR#91
 
 Changes in 3.1.1
 ================
index b6094c4e0769f0e5c89f606f9d0e7c3c6be97dc4..a1e760a13372f56feec8d27d07901c8b89682a6f 100644 (file)
           </listitem>
         </varlistentry>
 
+        <varlistentry>
+          <term>start dbus =
+          <replaceable>BOOLEAN</replaceable> (default:
+          <emphasis>yes</emphasis>) <type>(G)</type></term>
+
+          <listitem>
+            <para>Whether to start a dbus instance for use with Tracker.</para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term>start tracker =
+          <replaceable>BOOLEAN</replaceable> (default:
+          <emphasis>yes</emphasis>) <type>(G)</type></term>
+
+          <listitem>
+            <para>Whether to start Tracker with 
+            <emphasis>tracker-control -s</emphasis>.</para>
+          </listitem>
+        </varlistentry>
+
         <varlistentry>
           <term>veto message = <replaceable>BOOLEAN</replaceable> (default:
           <emphasis>no</emphasis>) <type>(G)</type></term>
index 1e5e7394df01e866b93a531b96af23929a1d652d..1ce7befca67d66073dbac94b16fe7924fb4ef746 100644 (file)
@@ -418,28 +418,26 @@ int main(int argc, char **argv)
         setenv("XDG_CACHE_HOME", _PATH_STATEDIR, 0);
         setenv("TRACKER_USE_LOG_FILES", "1", 0);
 
-        dbus_path = atalk_iniparser_getstring(obj.iniconfig, INISEC_GLOBAL, "dbus daemon", DBUS_DAEMON_PATH);
-        LOG(log_debug, logtype_default, "DBUS: '%s'", dbus_path);
-        if ((dbus_pid = run_process(dbus_path, "--config-file=" _PATH_CONFDIR "dbus-session.conf", NULL)) == NETATALK_SRV_ERROR) {
-            LOG(log_error, logtype_default, "Error starting '%s'", dbus_path);
-            netatalk_exit(EXITERR_CONF);
+        if (atalk_iniparser_getboolean(obj.iniconfig, INISEC_GLOBAL, "start dbus", 1)) {
+            dbus_path = atalk_iniparser_getstring(obj.iniconfig, INISEC_GLOBAL, "dbus daemon", DBUS_DAEMON_PATH);
+            LOG(log_debug, logtype_default, "DBUS: '%s'", dbus_path);
+            if ((dbus_pid = run_process(dbus_path, "--config-file=" _PATH_CONFDIR "dbus-session.conf", NULL)) == NETATALK_SRV_ERROR) {
+                LOG(log_error, logtype_default, "Error starting '%s'", dbus_path);
+                netatalk_exit(EXITERR_CONF);
+            }
+
+            /* Allow dbus some time to start up */
+            sleep(1);
         }
 
-        /* Allow dbus some time to start up */
-        sleep(1);
-#endif
-
-#ifdef HAVE_TRACKER_SPARQL
-#ifdef SOLARIS
-        setenv("XDG_DATA_DIRS", TRACKER_PREFIX "/share", 0);
-        setenv("TRACKER_DB_ONTOLOGIES_DIR", TRACKER_PREFIX "/share/tracker/ontologies", 0);
-        setenv("TRACKER_EXTRACTOR_RULES_DIR", TRACKER_PREFIX "/share/tracker/extract-rules", 0);
-        setenv("TRACKER_LANGUAGE_STOPWORDS_DIR", TRACKER_PREFIX "/share/tracker/languages", 0);
-#endif
         set_sl_volumes();
-        system(TRACKER_PREFIX "/bin/tracker-control -s");
-#endif
+
+        if (atalk_iniparser_getboolean(obj.iniconfig, INISEC_GLOBAL, "start tracker", 1)) {
+            system(TRACKER_PREFIX "/bin/tracker-control -s");
+        }
     }
+#endif
+
 
     /* run the event loop */
     ret = event_base_dispatch(base);
index 723cf6898ae452f3b34688ec03d18d7c056b44ca..e50d634c555198647bea225590c879717e3bacb3 100644 (file)
@@ -638,6 +638,17 @@ Whether to enable Spotlight searches\&. Note: once the global option is enabled,
 option\&.
 .RE
 .PP
+start dbus = \fIBOOLEAN\fR (default: \fIyes\fR) \fB(G)\fR
+.RS 4
+Whether to start a dbus instance for use with Tracker\&.
+.RE
+.PP
+start tracker = \fIBOOLEAN\fR (default: \fIyes\fR) \fB(G)\fR
+.RS 4
+Whether to start Tracker with
+\fItracker\-control \-s\fR\&.
+.RE
+.PP
 veto message = \fIBOOLEAN\fR (default: \fIno\fR) \fB(G)\fR
 .RS 4
 Send optional AFP messages for vetoed files\&. Then whenever a client tries to access any file or directory with a vetoed name, it will be sent an AFP message indicating the name and the directory\&.