chiark / gitweb /
fettle the right state word...
[disorder] / server / disorderd.c
index 4a3915aa466e0896c7d329cb9d125b7244e95ce2..3cb56d09d7c1637c7e8349718ac0208ea8c4c8f1 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 #include <config.h>
+#include "types.h"
 
 #include <stdio.h>
 #include <getopt.h>
@@ -70,6 +71,7 @@ static const struct option options[] = {
   { "log", required_argument, 0, 'l' },
   { "pidfile", required_argument, 0, 'P' },
   { "no-initial-rescan", no_argument, 0, 'N' },
+  { "wide-open", no_argument, 0, 'w' },
   { "syslog", no_argument, 0, 's' },
   { 0, 0, 0, 0 }
 };
@@ -189,7 +191,7 @@ static void fix_path(void) {
   if(!path)
     error(0, "PATH is not set at all!");
 
-  if(*finkbindir)
+  if(*finkbindir && strcmp(finkbindir, "/"))
     /* We appear to be a finkized mac; include fink on the path in case the
      * tools we need are there. */
     byte_xasprintf(&newpath, "PATH=%s:%s:%s:%s", 
@@ -221,6 +223,7 @@ int main(int argc, char **argv) {
     case 'P': pidfile = optarg; break;
     case 'N': initial_rescan = 0; break;
     case 's': logsyslog = 1; break;
+    case 'w': wideopen = 1; break;
     default: fatal(0, "invalid option");
     }
   }