diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-04-16 11:10:55 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-04-16 11:10:55 +0000 |
commit | d49d16a84422346630c3196e3de9727ea872371c (patch) | |
tree | b22d333f140a1476f793a76fec824c17ad4bccff /src/util | |
parent | 1d3dc794d9a5e82375995af14e91668430a31293 (diff) |
support overriding GNUNET_DEFAULT_USER_CONFIG_FILE
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/os_installation.c | 2 | ||||
-rw-r--r-- | src/util/program.c | 2 | ||||
-rw-r--r-- | src/util/service.c | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/src/util/os_installation.c b/src/util/os_installation.c index 8606d5c588..45f5052aad 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c @@ -60,6 +60,8 @@ static const struct GNUNET_OS_ProjectData default_pd = { .env_varname = "GNUNET_PREFIX", .bug_email = "gnunet-developers@gnu.org", .homepage = "http://www.gnu.org/s/gnunet/", + .config_file = "gnunet.conf", + .user_config_file = "~/.config/gnunet.conf" }; /** diff --git a/src/util/program.c b/src/util/program.c index a313ce87e6..bf7885fe91 100644 --- a/src/util/program.c +++ b/src/util/program.c @@ -225,7 +225,7 @@ GNUNET_PROGRAM_run2 (int argc, char *const *argv, const char *binaryName, DIR_SEPARATOR_STR, GNUNET_OS_project_data_get ()->config_file); else - cfg_fn = GNUNET_strdup (GNUNET_DEFAULT_USER_CONFIG_FILE); + cfg_fn = GNUNET_strdup (GNUNET_OS_project_data_get ()->user_config_file); lpfx = GNUNET_strdup (binaryName); if (NULL != (spc = strstr (lpfx, " "))) *spc = '\0'; diff --git a/src/util/service.c b/src/util/service.c index c7f9650214..93a51f2202 100644 --- a/src/util/service.c +++ b/src/util/service.c @@ -1429,7 +1429,7 @@ GNUNET_SERVICE_run (int argc, char *const *argv, DIR_SEPARATOR_STR, GNUNET_OS_project_data_get ()->config_file); else - cfg_fn = GNUNET_strdup (GNUNET_DEFAULT_USER_CONFIG_FILE); + cfg_fn = GNUNET_strdup (GNUNET_OS_project_data_get ()->user_config_file); memset (&sctx, 0, sizeof (sctx)); sctx.options = options; sctx.ready_confirm_fd = -1; |