diff options
Diffstat (limited to 'ospfd')
-rw-r--r-- | ospfd/Makefile.am | 2 | ||||
-rw-r--r-- | ospfd/ospf_main.c | 12 | ||||
-rw-r--r-- | ospfd/ospfd.h | 4 |
3 files changed, 13 insertions, 5 deletions
diff --git a/ospfd/Makefile.am b/ospfd/Makefile.am index 2e4d5c8e..bed90d7b 100644 --- a/ospfd/Makefile.am +++ b/ospfd/Makefile.am @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in. INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib @SNMP_INCLUDES@ -DEFS = @DEFS@ $(LOCAL_OPTS) -DSYSCONFDIR=\"$(sysconfdir)/\" +DEFS = @DEFS@ $(LOCAL_OPTS) INSTALL_SDATA=@INSTALL@ -m 600 lib_LTLIBRARIES = libospf.la diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c index 8b9a3458..30993aa3 100644 --- a/ospfd/ospf_main.c +++ b/ospfd/ospf_main.c @@ -72,7 +72,7 @@ struct zebra_privs_t ospfd_privs = }; /* Configuration filename and directory. */ -char config_default[] = SYSCONFDIR OSPF_DEFAULT_CONFIG; +char config_default[MAXPATHLEN]; /* OSPFd options. */ struct option longopts[] = @@ -96,8 +96,11 @@ struct option longopts[] = /* Master of threads. */ struct thread_master *master; +/* pid_file default value */ +static char pid_file_default[MAXPATHLEN]; + /* Process ID saved for use by init system */ -const char *pid_file = PATH_OSPFD_PID; +const char *pid_file = pid_file_default; #ifdef SUPPORT_OSPF_API extern int ospf_apiserver_enable; @@ -274,6 +277,9 @@ main (int argc, char **argv) } } + strcpy (config_default, path_config (OSPF_CONFIG_NAME)); + strcpy (pid_file_default, path_state (OSPF_PID_NAME)); + /* Initializations. */ master = om->master; @@ -324,7 +330,7 @@ main (int argc, char **argv) pid_output (pid_file); /* Create VTY socket */ - vty_serv_sock (vty_addr, vty_port, OSPF_VTYSH_PATH); + vty_serv_sock (vty_addr, vty_port, path_state (OSPF_VTY_NAME)); /* Print banner. */ zlog_notice ("OSPFd %s starting: vty@%d", QUAGGA_VERSION, vty_port); diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h index b24b3ced..64e91cef 100644 --- a/ospfd/ospfd.h +++ b/ospfd/ospfd.h @@ -48,7 +48,9 @@ #define OSPF_VL_IP_TTL 100 /* Default configuration file name for ospfd. */ -#define OSPF_DEFAULT_CONFIG "ospfd.conf" +#define OSPF_CONFIG_NAME "ospfd.conf" +#define OSPF_PID_NAME "ospfd.pid" +#define OSPF_VTY_NAME "ospfd.vty" /* Architectual Constants */ #ifdef DEBUG |