summaryrefslogtreecommitdiffstats
path: root/zebra/test_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/test_main.c')
-rw-r--r--zebra/test_main.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/zebra/test_main.c b/zebra/test_main.c
index 70a1a3a6..4e1002e8 100644
--- a/zebra/test_main.c
+++ b/zebra/test_main.c
@@ -29,6 +29,7 @@
#include "log.h"
#include "privs.h"
#include "sigevent.h"
+#include "paths.h"
#include "zebra/rib.h"
#include "zebra/zserv.h"
@@ -73,10 +74,13 @@ zebra_capabilities_t _caps_p [] =
};
/* Default configuration file path. */
-char config_default[] = SYSCONFDIR DEFAULT_CONFIG_FILE;
+char config_default[MAXPATHLEN];
+
+/* pid_file default value */
+static char pid_file_default[MAXPATHLEN];
/* Process ID saved for use by init system */
-const char *pid_file = PATH_ZEBRA_PID;
+const char *pid_file = pid_file_default;
/* Help information display. */
static void
@@ -276,6 +280,9 @@ main (int argc, char **argv)
usage (progname, 1);
}
+ strcpy (config_default, path_config (ZEBRA_CONFIG_NAME));
+ strcpy (pid_file_default, path_state (ZEBRA_PID_NAME));
+
/* Make master thread emulator. */
zebrad.master = thread_master_create ();