summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgpd.h1
-rwxr-xr-xconfigure.ac31
-rw-r--r--ospf6d/ospf6d.h1
-rw-r--r--ospfd/ospfd.h1
-rw-r--r--ripd/ripd.h1
-rw-r--r--ripngd/ripngd.h1
-rw-r--r--zebra/zserv.h2
7 files changed, 31 insertions, 7 deletions
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index 01d47212..e3ac73f1 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -611,7 +611,6 @@ struct bgp_nlri
/* Default configuration settings for bgpd. */
#define BGP_VTY_PORT 2605
-#define BGP_VTYSH_PATH "/tmp/.bgpd"
#define BGP_DEFAULT_CONFIG "bgpd.conf"
/* Check AS path loop when we send NLRI. */
diff --git a/configure.ac b/configure.ac
index f66691c1..c8460c12 100755
--- a/configure.ac
+++ b/configure.ac
@@ -831,6 +831,37 @@ AC_DEFINE_UNQUOTED(PATH_BGPD_PID, "$ac_piddir/bgpd.pid",bgpd PID)
AC_DEFINE_UNQUOTED(PATH_OSPFD_PID, "$ac_piddir/ospfd.pid",ospfd PID)
AC_DEFINE_UNQUOTED(PATH_OSPF6D_PID, "$ac_piddir/ospf6d.pid",ospf6d PID)
+dnl ------------------------------
+dnl set paths for socket files
+dnl ------------------------------
+if test "${prefix}" = "NONE"; then
+ ac_sock_prefix="";
+else
+ ac_sock_prefix=${prefix}
+fi
+if test "${localstatedir}" = '${prefix}/var'; then
+ AC_CACHE_CHECK(socket directory,ac_sockdir,
+ [for ZEBRA_SOCK_DIR in ${ac_sock_prefix}/var/run/zebra dnl
+ ${ac_sock_prefix}/var/run dnl
+ ${ac_sock_prefix}/var/adm dnl
+ ${ac_sock_prefix}/tmp; dnl
+ do
+ test -d $ZEBRA_SOCK_DIR && break
+ done
+ ac_sockdir=$ZEBRA_SOCK_DIR
+ if test ! -d $ZEBRA_SOCK_DIR ; then
+ echo "SOCKET DIRECTORY NOT FOUND!"
+ fi])
+else
+ ac_sockdir="`eval echo ${localstatedir}`"
+fi
+AC_DEFINE_UNQUOTED(ZEBRA_SERV_PATH, "$ac_sockdir/zserv.api",zebra api socket)
+AC_DEFINE_UNQUOTED(ZEBRA_VTYSH_PATH, "$ac_sockdir/zebra.vty",zebra vty socket)
+AC_DEFINE_UNQUOTED(RIP_VTYSH_PATH, "$ac_sockdir/ripd.vty",rip vty socket)
+AC_DEFINE_UNQUOTED(RIPNG_VTYSH_PATH, "$ac_sockdir/ripngd.vty",ripng vty socket)
+AC_DEFINE_UNQUOTED(BGP_VTYSH_PATH, "$ac_sockdir/bgpd.vty",bgpd vty socket)
+AC_DEFINE_UNQUOTED(OSPF_VTYSH_PATH, "$ac_sockdir/ospfd.vty",ospfd vty socket)
+AC_DEFINE_UNQUOTED(OSPF6_VTYSH_PATH, "$ac_sockdir/ospf6d.vty",ospf6d vty socket)
dnl ---------------------------
dnl Check htonl works correctly
diff --git a/ospf6d/ospf6d.h b/ospf6d/ospf6d.h
index e0d310a9..4c9f7dc3 100644
--- a/ospf6d/ospf6d.h
+++ b/ospf6d/ospf6d.h
@@ -94,7 +94,6 @@ extern char *recent_reason;
/* Default port values. */
#define OSPF6_VTY_PORT 2606
-#define OSPF6_VTYSH_PATH "/tmp/.ospf6d"
#ifdef INRIA_IPV6
#ifndef IPV6_PKTINFO
diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h
index f842486e..7f82fffb 100644
--- a/ospfd/ospfd.h
+++ b/ospfd/ospfd.h
@@ -39,7 +39,6 @@
/* VTY port number. */
#define OSPF_VTY_PORT 2604
-#define OSPF_VTYSH_PATH "/tmp/.ospfd"
/* IP TTL for OSPF protocol. */
#define OSPF_IP_TTL 1
diff --git a/ripd/ripd.h b/ripd/ripd.h
index 17301c37..112e1cbf 100644
--- a/ripd/ripd.h
+++ b/ripd/ripd.h
@@ -64,7 +64,6 @@
/* RIP port number. */
#define RIP_PORT_DEFAULT 520
#define RIP_VTY_PORT 2602
-#define RIP_VTYSH_PATH "/tmp/.ripd"
/* Default configuration file name. */
#define RIPD_DEFAULT_CONFIG "ripd.conf"
diff --git a/ripngd/ripngd.h b/ripngd/ripngd.h
index 2509bdd5..816deb64 100644
--- a/ripngd/ripngd.h
+++ b/ripngd/ripngd.h
@@ -27,7 +27,6 @@
#define RIPNG_V1 1
#define RIPNG_PORT_DEFAULT 521
#define RIPNG_VTY_PORT 2603
-#define RIPNG_VTYSH_PATH "/tmp/.ripngd"
#define RIPNG_MAX_PACKET_SIZE 1500
#define RIPNG_PRIORITY_DEFAULT 0
diff --git a/zebra/zserv.h b/zebra/zserv.h
index c7622808..a083611f 100644
--- a/zebra/zserv.h
+++ b/zebra/zserv.h
@@ -25,8 +25,6 @@
/* Default port information. */
#define ZEBRA_PORT 2600
#define ZEBRA_VTY_PORT 2601
-#define ZEBRA_VTYSH_PATH "/tmp/.zebra"
-#define ZEBRA_SERV_PATH "/tmp/.zserv"
/* Default configuration filename. */
#define DEFAULT_CONFIG_FILE "zebra.conf"