summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/agentx.c5
-rw-r--r--lib/version.h.in1
-rw-r--r--ospfd/ospf_main.c4
-rw-r--r--vtysh/vtysh.c9
-rw-r--r--watchquagga/watchquagga.c2
-rw-r--r--zebra/zebra_ptm.c3
6 files changed, 14 insertions, 10 deletions
diff --git a/lib/agentx.c b/lib/agentx.c
index 5996b34a0..4175e7ba9 100644
--- a/lib/agentx.c
+++ b/lib/agentx.c
@@ -31,6 +31,7 @@
#include "smux.h"
#include "memory.h"
#include "linklist.h"
+#include "version.h"
static int agentx_enabled = 0;
@@ -175,7 +176,7 @@ DEFUN (agentx_enable,
{
if (!agentx_enabled)
{
- init_snmp("quagga");
+ init_snmp(FRR_SMUX_NAME);
events = list_new();
agentx_events_update ();
agentx_enabled = 1;
@@ -209,7 +210,7 @@ smux_init (struct thread_master *tm)
SNMP_CALLBACK_LOGGING,
agentx_log_callback,
NULL);
- init_agent ("quagga");
+ init_agent (FRR_SMUX_NAME);
install_node (&agentx_node, config_write_agentx);
install_element (CONFIG_NODE, &agentx_enable_cmd);
diff --git a/lib/version.h.in b/lib/version.h.in
index c41d44e0a..adc827818 100644
--- a/lib/version.h.in
+++ b/lib/version.h.in
@@ -37,6 +37,7 @@
#define FRR_PAM_NAME "@PACKAGE_NAME@"
#define FRR_SMUX_NAME "@PACKAGE_NAME@"
+#define FRR_PTM_NAME "@PACKAGE_NAME@"
#define FRR_FULL_NAME "FreeRangeRouting"
#define FRR_VERSION "@PACKAGE_VERSION@" GIT_SUFFIX
diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c
index 5309af5bf..e0719b397 100644
--- a/ospfd/ospf_main.c
+++ b/ospfd/ospf_main.c
@@ -360,8 +360,8 @@ main (int argc, char **argv)
/* Create VTY socket */
if (instance)
{
- sprintf(pid_file, "/var/run/quagga/ospfd-%d.pid", instance);
- sprintf(vty_path, "/var/run/quagga/ospfd-%d.vty", instance);
+ sprintf(pid_file, "%s/ospfd-%d.pid", DAEMON_VTY_DIR, instance);
+ sprintf(vty_path, "%s/ospfd-%d.vty", DAEMON_VTY_DIR, instance);
}
else
{
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 82d0f437d..a4f108e44 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -2999,8 +2999,8 @@ vtysh_update_all_insances(struct vtysh_client * head_client)
if (head_client->flag != VTYSH_OSPFD) return;
- /* ls /var/run/quagga/ and look for all files ending in .vty */
- dir = opendir("/var/run/quagga/");
+ /* ls DAEMON_VTY_DIR and look for all files ending in .vty */
+ dir = opendir(DAEMON_VTY_DIR "/");
if (dir)
{
while ((file = readdir(dir)) != NULL)
@@ -3010,7 +3010,8 @@ vtysh_update_all_insances(struct vtysh_client * head_client)
if (n == MAXIMUM_INSTANCES)
{
fprintf(stderr,
- "Parsing /var/run/quagga/, client limit(%d) reached!\n", n);
+ "Parsing %s/, client limit(%d) reached!\n",
+ DAEMON_VTY_DIR, n);
break;
}
client = (struct vtysh_client *) malloc(sizeof(struct vtysh_client));
@@ -3018,7 +3019,7 @@ vtysh_update_all_insances(struct vtysh_client * head_client)
client->name = "ospfd";
client->flag = VTYSH_OSPFD;
ptr = (char *) malloc(100);
- sprintf(ptr, "/var/run/quagga/%s", file->d_name);
+ sprintf(ptr, "%s/%s", DAEMON_VTY_DIR, file->d_name);
client->path = (const char *)ptr;
client->next = NULL;
vtysh_client_sorted_insert(head_client, client);
diff --git a/watchquagga/watchquagga.c b/watchquagga/watchquagga.c
index 98e912956..a70070bef 100644
--- a/watchquagga/watchquagga.c
+++ b/watchquagga/watchquagga.c
@@ -706,7 +706,7 @@ daemon_send_ready (void)
#if defined (HAVE_CUMULUS)
FILE *fp;
- fp = fopen("/var/run/quagga/watchquagga.started", "w");
+ fp = fopen(DAEMON_VTY_DIR "/watchquagga.started", "w");
fclose(fp);
#endif
zlog_notice ("Watchquagga: Notifying Systemd we are up and running");
diff --git a/zebra/zebra_ptm.c b/zebra/zebra_ptm.c
index e6d13b507..c5223199a 100644
--- a/zebra/zebra_ptm.c
+++ b/zebra/zebra_ptm.c
@@ -38,6 +38,7 @@
#include "vrf.h"
#include "rib.h"
#include "zebra_vrf.h"
+#include "version.h"
#define ZEBRA_PTM_RECONNECT_TIME_INITIAL 1 /* initial reconnect is 1s */
#define ZEBRA_PTM_RECONNECT_TIME_MAX 300
@@ -119,7 +120,7 @@ zebra_ptm_init (void)
ptm_cb.pid = getpid();
zebra_ptm_install_commands();
- sprintf(buf, "%s", "quagga");
+ sprintf(buf, "%s", FRR_PTM_NAME);
ptm_hdl = ptm_lib_register(buf, NULL, zebra_ptm_handle_msg_cb,
zebra_ptm_handle_msg_cb);
ptm_cb.wb = buffer_new(0);