aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-04-16 11:10:55 +0000
committerChristian Grothoff <christian@grothoff.org>2016-04-16 11:10:55 +0000
commitd49d16a84422346630c3196e3de9727ea872371c (patch)
treeb22d333f140a1476f793a76fec824c17ad4bccff /src/util
parent1d3dc794d9a5e82375995af14e91668430a31293 (diff)
downloadgnunet-d49d16a84422346630c3196e3de9727ea872371c.tar.gz
gnunet-d49d16a84422346630c3196e3de9727ea872371c.zip
support overriding GNUNET_DEFAULT_USER_CONFIG_FILE
Diffstat (limited to 'src/util')
-rw-r--r--src/util/os_installation.c2
-rw-r--r--src/util/program.c2
-rw-r--r--src/util/service.c2
3 files changed, 4 insertions, 2 deletions
diff --git a/src/util/os_installation.c b/src/util/os_installation.c
index 8606d5c58..45f5052aa 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 = {
60 .env_varname = "GNUNET_PREFIX", 60 .env_varname = "GNUNET_PREFIX",
61 .bug_email = "gnunet-developers@gnu.org", 61 .bug_email = "gnunet-developers@gnu.org",
62 .homepage = "http://www.gnu.org/s/gnunet/", 62 .homepage = "http://www.gnu.org/s/gnunet/",
63 .config_file = "gnunet.conf",
64 .user_config_file = "~/.config/gnunet.conf"
63}; 65};
64 66
65/** 67/**
diff --git a/src/util/program.c b/src/util/program.c
index a313ce87e..bf7885fe9 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,
225 DIR_SEPARATOR_STR, 225 DIR_SEPARATOR_STR,
226 GNUNET_OS_project_data_get ()->config_file); 226 GNUNET_OS_project_data_get ()->config_file);
227 else 227 else
228 cfg_fn = GNUNET_strdup (GNUNET_DEFAULT_USER_CONFIG_FILE); 228 cfg_fn = GNUNET_strdup (GNUNET_OS_project_data_get ()->user_config_file);
229 lpfx = GNUNET_strdup (binaryName); 229 lpfx = GNUNET_strdup (binaryName);
230 if (NULL != (spc = strstr (lpfx, " "))) 230 if (NULL != (spc = strstr (lpfx, " ")))
231 *spc = '\0'; 231 *spc = '\0';
diff --git a/src/util/service.c b/src/util/service.c
index c7f965021..93a51f220 100644
--- a/src/util/service.c
+++ b/src/util/service.c
@@ -1429,7 +1429,7 @@ GNUNET_SERVICE_run (int argc, char *const *argv,
1429 DIR_SEPARATOR_STR, 1429 DIR_SEPARATOR_STR,
1430 GNUNET_OS_project_data_get ()->config_file); 1430 GNUNET_OS_project_data_get ()->config_file);
1431 else 1431 else
1432 cfg_fn = GNUNET_strdup (GNUNET_DEFAULT_USER_CONFIG_FILE); 1432 cfg_fn = GNUNET_strdup (GNUNET_OS_project_data_get ()->user_config_file);
1433 memset (&sctx, 0, sizeof (sctx)); 1433 memset (&sctx, 0, sizeof (sctx));
1434 sctx.options = options; 1434 sctx.options = options;
1435 sctx.ready_confirm_fd = -1; 1435 sctx.ready_confirm_fd = -1;