gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r734 - in GNUnet: contrib src/conf


From: durner
Subject: [GNUnet-SVN] r734 - in GNUnet: contrib src/conf
Date: Tue, 3 May 2005 09:23:56 -0700 (PDT)

Author: durner
Date: 2005-05-03 09:23:43 -0700 (Tue, 03 May 2005)
New Revision: 734

Added:
   GNUnet/contrib/config-user.in
Modified:
   GNUnet/contrib/config.in
   GNUnet/src/conf/confdata.c
Log:
user specific configuration

Added: GNUnet/contrib/config-user.in
===================================================================
--- GNUnet/contrib/config-user.in       2005-05-02 17:48:29 UTC (rev 733)
+++ GNUnet/contrib/config-user.in       2005-05-03 16:23:43 UTC (rev 734)
@@ -0,0 +1,241 @@
+mainmenu "GNUnet user configuration"
+
+menu "Meta-configuration" "Meta"
+  config ADVANCED
+  bool "Show options for advanced users"
+  
+  config RARE
+  bool "Show rarely used options"
+  
+  config CONF_DEF_DIR
+  string "Default configuration directory"
+  depends on RARE
+  default "/etc/"
+  help
+       This is the directory where gnunet-setup will store the configuration
+       file by default.
+       Default: CONF_DEF_DIR                   = ~/.gnunet/
+  
+  config CONF_DEF_FILE
+  string "Default configuration file"
+  depends on RARE
+  default "gnunet-user.conf"
+  help
+       This is the filename under which gnunet-setup will store the 
configuration
+       by default.
+       Default: CONF_DEF_FILE          = gnunet-user.conf
+endmenu
+
+menu "General settings" "GNUNET"
+       config GNUNET_HOME
+       string "Directory of user specific files"
+       default "~/.gnunet"
+       help
+               This is the directory where GNUnet is putting
+               user-specific files (such as pseudonyms).  Typically,
+               GNUnet should not put more than a few of MB there.
+
+       config LOGLEVEL
+       string "What kinds of (debug) output should be printed"
+       default "WARNING"
+       depends on Meta::ADVANCED
+       help
+               What kinds of (debug) output should be printed? You can 
+               use NOTHING, FATAL, ERROR, FAILURE, WARNING, MESSAGE, INFO, 
DEBUG, 
+               CRON or EVERYTHING (which print more and more messages in this 
order). 
+               Default is WARNING which is usually enough to let you know if 
there
+               is any problems.
+
+       config LOGFILE
+       string "Where to write the messages"
+       default "$GNUNET_HOME/logs"
+       depends on Meta::ADVANCED
+       help
+               Where to write the messages? Leave the entry unspecified (as
+               default) to make the clients print their messages to stderr.
+               Default is unspecified (stderr).
+endmenu
+
+menu "Network options for the clients" "NETWORK"
+       config PORT
+       int "Port to use to talk to gnunetd"
+       default 2087
+       depends on Meta::ADVANCED
+       help
+               Port to use to talk to gnunetd, default is 2087
+
+       config HOST
+       string "On which machine runs gnunetd (for clients)"
+       default "localhost"
+       depends on Meta::ADVANCED
+       help
+               On which machine runs gnunetd (for clients) This is equivalent 
to
+               the -H option.  Default is localhost.
+endmenu
+
+
+menu "Options for filesharing (FS)" "FS"
+       config INSERT-PRIORITY
+       int "Default priority for locally inserted content"
+       default 50
+       depends on Meta::RARE
+       help
+               Default priority for locally inserted content
+               Default: 50
+
+       config INSERT-EXPIRATION
+       int "Default expiration time for locally inserted content"
+       default 36500
+       depends on Meta::RARE
+       help
+               Default expiration time for locally inserted content, in days
+               Default is 36500 (100 years)
+
+       config SEARCHTIMEOUT
+       int "How long should gnunet-search try to get an answer to a query"
+       default 3000
+       depends on Meta::ADVANCED
+       help
+               How long should gnunet-search try to get an answer to a query 
before
+               timing out (in seconds).  Default is "3000", which should be 
enough
+               for pretty much anything. Use 0 for no timeout.
+
+       config ANONYMITY-RECEIVE
+       int "Anonymity level for receiving data (default)"
+       default 1
+       depends on Meta::ADVANCED
+       help
+               Anonymity level for receiving data (default)
+
+       config ANONYMITY-SEND
+       int "Anonymity level for sharing data (default)"
+       default 1
+       depends on Meta::ADVANCED
+       help
+               Anonymity level for sharing data (default)
+
+       config MAXRESULTS
+       int "Default limit for the number of search results"
+       default 0
+       depends on Meta::ADVANCED
+       help
+               Default limit for the number of search results (0 for unlimited)
+
+       config SEARCHTIMEOUT
+       int "Default timeout for searches"
+       default 300
+       depends on Meta::ADVANCED
+       help
+               Default timeout for searches
+
+
+       config EXTRACTORS
+       string "Specify which additional extractor libraries should be used"
+       default 
"libextractor_filename:-libextractor_split:-libextractor_lower:-libextractor_thumbnail"
+       depends on Meta::RARE
+       help
+               Specify which additional extractor libraries should be used.
+               gnunet-insert uses libextractor to extract keywords from files.
+               libextractor can be dynamically extended to handle additional 
file
+               formats. If you want to use more than the default set of 
extractors,
+               specify additional extractor libraries here.  The format is
+               [[-]LIBRARYNAME[:[-]LIBRARYNAME]*] The default is to use 
filenames
+               and to break larger words at spaces (and underscores, etc.).  
This
+               should be just fine for most people. The - before a library name
+               indicates that this should be executed last and makes only 
sense for
+               the split-library.
+               Default is 
libextractor_filename:-libextractor_split:-libextractor_lower:-libextractor_thumbnail
+
+       config DOWNLOADDIR
+       string "Where to download files to"
+       default "/tmp/gnunet-downloads/"
+       help
+               Where to download files to (by default)?
+               Default is /tmp/gnunet-downloads/
+               
+       config DISABLE-SYMLINK
+       bool "Disable symlinking"
+       default y
+       depends on Meta::RARE
+       help
+               Disable symlinking.  When set to YES, GNUnet will always make
+               a copy of the file when files are indexed.  The default is to
+               try to use a symbolic link (if possible).
+               Note that you should NEVER, NEVER simply delete the .gnunet 
+               directory if this is set to 'NO', since all inserted files
+               will have been moved into that directory and replaced with
+               symbolic links.  So if you were to remove ~/.gnunet, you will
+               loose those files unless you first run gnunet-delete to undo
+               the symlinking!
+               It is much more (space)-efficient to set this to NO,
+               but you need to know what you're doing.  This is why the
+               default is 'YES'.
+endmenu
+
+menu "Default options for gnunet-gtk" GNUNET-GTK
+       config GNUNETD-CONFIG
+       string "Path to the gnunet.conf file"
+       default "/etc/gnunet.conf"
+       help
+               Path to the gnunet.conf file for gnunetd (for
+               forking gnunetd by gnunet-gtk)
+endmenu
+
+menu "Defaults for gnunet-chat" GNUNET-CHAT
+       config NICK
+       string "Nickname"
+       default "my nickname"
+       help
+               You can specify your nickname here and thus avoid having to 
pass it
+               with -n NICK at the command-line.  The default is empty.
+               Default: "my nickname"
+endmenu
+
+if Meta:RARE
+menu "Defaults for gnunet-tracekit" GNUNET-TRACEKIT
+       config WAIT
+       int "How long to wait for replies"
+       default 30
+       help
+               How long to wait for replies (in seconds)? (default: 30)
+
+       config HOPS
+       int "How many hops should the trace go"
+       default 5
+       help
+               How many hops should the trace go? (default: 5)
+
+       config PRIORITY
+       int "How important is the trace message"
+       default 1000
+       help
+               How important is the trace message? (default: 1000)
+
+       config FORMAT
+       int "Output format"
+       default 2
+       help
+               Output format, 0 is human readable, 1 is dot,
+               2 is vcg (default: 2)
+endmenu
+
+menu "Defaults for gnunet-testbed" "GNUNET-TESTBED"
+       config PORT
+       int "Internal port"
+       default 2089
+       help
+               Port used internally by gnunet-testbed
+               (for the IPC in the gnunet-testbed shell).
+               The default is 2089.
+
+       config REGISTERURL
+       int "Registration URL"
+       default "http://ovmj.org/GNUnet/testbed/";
+       help
+               At which URL does the registration software
+               run?
+               Default is http://ovmj.org/GNUnet/testbed/
+endmenu
+endif
+
+endmenu

Modified: GNUnet/contrib/config.in
===================================================================
--- GNUnet/contrib/config.in    2005-05-02 17:48:29 UTC (rev 733)
+++ GNUnet/contrib/config.in    2005-05-03 16:23:43 UTC (rev 734)
@@ -24,6 +24,24 @@
   
   config RARE
   bool "Show rarely used options"
+  
+  config CONF_DEF_DIR
+  string "Default configuration directory"
+  depends on RARE
+  default "/etc/"
+  help
+       This is the directory where gnunet-setup will store the configuration
+       file by default.
+       Default: CONF_DEF_DIR                   = /etc/
+  
+  config CONF_DEF_FILE
+  string "Default configuration file"
+  depends on RARE
+  default "gnunet.conf"
+  help
+       This is the filename under which gnunet-setup will store the 
configuration
+       by default.
+       Default: CONF_DEF_FILE          = gnunet.conf
 endmenu
 
 menu "General settings" "GNUNETD"

Modified: GNUnet/src/conf/confdata.c
===================================================================
--- GNUnet/src/conf/confdata.c  2005-05-02 17:48:29 UTC (rev 733)
+++ GNUnet/src/conf/confdata.c  2005-05-03 16:23:43 UTC (rev 734)
@@ -24,7 +24,6 @@
 #include "platform.h"
 #include "gnunet_util.h"
 
-const char conf_def_dir[] = "/etc/";
 const char conf_def_filename[] = "gnunet.conf";
 
 const char conf_defname[] = "defconfig";
@@ -223,7 +222,11 @@
        char dirname[128], tmpname[128], dstname[128], newname[128];
        int type;
        const char *str;
+       struct symbol *confDefFn;
 
+       confDefFn = sym_find("CONF_DEF_FILE", "Meta");
+       sym_calc_value_ext(confDefFn, 1);       
+
        dirname[0] = 0;
        if (name && name[0]) {
                char *slash = strrchr(name, DIR_SEPARATOR);
@@ -234,14 +237,20 @@
                        if (slash[1])
                                basename = slash + 1;
                        else
-                               basename = conf_def_filename;
+                               basename = sym_get_string_value(confDefFn);
                } else
                        basename = name;
        } else
-               basename = conf_def_filename;
+               basename = sym_get_string_value(confDefFn);
 
-       if (! dirname[0])
-               strcpy(dirname, conf_def_dir);
+       if (! dirname[0]) {
+               struct symbol *confDefDir;
+               
+               confDefDir = sym_find("CONF_DEF_DIR", "Meta");
+               sym_calc_value_ext(confDefDir, 1);
+               
+               strcpy(dirname, sym_get_string_value(confDefDir));
+       }
 
        sprintf(newname,
                "%s.tmpconfig.%u",





reply via email to

[Prev in Thread] Current Thread [Next in Thread]