summaryrefslogtreecommitdiffstats
path: root/watchfrr
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-05-31 01:38:00 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-06-04 16:37:19 +0200
commit3c649c719f327725ebd85643ff07f18e95ecb2b5 (patch)
treee44e61b7851644887f51c7c8e1a37fa1acfa7bce /watchfrr
parentldpd: Allow for -N <namespace> to influence location of LDPD_SOCKET (diff)
downloadfrr-3c649c719f327725ebd85643ff07f18e95ecb2b5.tar.xz
frr-3c649c719f327725ebd85643ff07f18e95ecb2b5.zip
*: Convert to using frr_vtydir instead of DAEMON_VTY_DIR
In a variety of places we are using DAEMON_VTY_DIR, convert to use frr_vtydir. This will allow us in a future commit to have the -N namespace option be automatically used. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'watchfrr')
-rw-r--r--watchfrr/watchfrr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/watchfrr/watchfrr.c b/watchfrr/watchfrr.c
index 34f8dabdf..f0ce88a5b 100644
--- a/watchfrr/watchfrr.c
+++ b/watchfrr/watchfrr.c
@@ -648,6 +648,7 @@ static void daemon_send_ready(int exitcode)
{
FILE *fp;
static int sent = 0;
+ char started[512];
if (sent)
return;
@@ -669,7 +670,9 @@ static void daemon_send_ready(int exitcode)
frr_detach();
- fp = fopen(DAEMON_VTY_DIR "/watchfrr.started", "w");
+ snprintf(started, sizeof(started), "%s%s", frr_vtydir,
+ "watchfrr.started");
+ fp = fopen(started, "w");
if (fp)
fclose(fp);
#if defined HAVE_SYSTEMD