diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2016-12-20 18:10:30 +0100 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2016-12-20 18:18:44 +0100 |
commit | ae435b1972ab95b647e816da6a2dbb9951628218 (patch) | |
tree | 157435d20e9a8170d1477c5db58cd1f90f1b5f1c /vtysh/vtysh.c | |
parent | build: remove INSTALL.quagga.txt (diff) | |
download | frr-ae435b1972ab95b647e816da6a2dbb9951628218.tar.xz frr-ae435b1972ab95b647e816da6a2dbb9951628218.zip |
build: replace some hardcoding with ./configure
Several places have paths and names that can change hardcoded, e.g. the
package name and the /var/run path. This fixes a few of them, there's
still some to do.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'vtysh/vtysh.c')
-rw-r--r-- | vtysh/vtysh.c | 9 |
1 files changed, 5 insertions, 4 deletions
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); |