From cf288f26b0f8e8146abce79a418b63be811c17b8 Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 11 Jun 2013 09:07:23 -0400 Subject: Add another carp status check to quagga package. --- config/quagga_ospfd/quagga_ospfd.inc | 13 +++++++++++++ config/quagga_ospfd/quagga_ospfd.xml | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'config/quagga_ospfd') diff --git a/config/quagga_ospfd/quagga_ospfd.inc b/config/quagga_ospfd/quagga_ospfd.inc index 46037bd9..591b9772 100644 --- a/config/quagga_ospfd/quagga_ospfd.inc +++ b/config/quagga_ospfd/quagga_ospfd.inc @@ -243,6 +243,18 @@ function quagga_ospfd_install_conf() { fwrite($fd, $zebraconffile); fclose($fd); + $carp_ip_status_check = ""; + if (is_ipaddr($ospfd_conf['carpstatusip'])) { + $carpcheckinterface = trim(find_carp_interface($ospfd_conf['carpstatusip'])); + $carp_ip_status_check = <</dev/null killall -9 ospfd 2>/dev/null sleep 1 +{$carp_ip_status_check} /usr/local/sbin/zebra -d -f {$quagga_config_base}/zebra.conf /usr/local/sbin/ospfd -d -f {$quagga_config_base}/ospfd.conf EOF; diff --git a/config/quagga_ospfd/quagga_ospfd.xml b/config/quagga_ospfd/quagga_ospfd.xml index c48d0f47..a03f9e3c 100644 --- a/config/quagga_ospfd/quagga_ospfd.xml +++ b/config/quagga_ospfd/quagga_ospfd.xml @@ -1,6 +1,6 @@ quagga_ospfd - 0.5.3 + 0.5.4 Services: Quagga OSPFd /usr/local/pkg/quagga_ospfd.inc pkg_edit.php?xml=quagga_ospfd.xml&id=0 -- cgit v1.2.3 From 783714c840c66b12f81e754d60b217774ef45295 Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 11 Jun 2013 09:23:01 -0400 Subject: add a couple of newlines here for spacing. --- config/quagga_ospfd/quagga_ospfd.inc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config/quagga_ospfd') diff --git a/config/quagga_ospfd/quagga_ospfd.inc b/config/quagga_ospfd/quagga_ospfd.inc index 591b9772..84bf8c4d 100644 --- a/config/quagga_ospfd/quagga_ospfd.inc +++ b/config/quagga_ospfd/quagga_ospfd.inc @@ -247,10 +247,12 @@ function quagga_ospfd_install_conf() { if (is_ipaddr($ospfd_conf['carpstatusip'])) { $carpcheckinterface = trim(find_carp_interface($ospfd_conf['carpstatusip'])); $carp_ip_status_check = << Date: Tue, 11 Jun 2013 09:27:28 -0400 Subject: Escape this $ here. --- config/quagga_ospfd/quagga_ospfd.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/quagga_ospfd') diff --git a/config/quagga_ospfd/quagga_ospfd.inc b/config/quagga_ospfd/quagga_ospfd.inc index 84bf8c4d..5e23dbf8 100644 --- a/config/quagga_ospfd/quagga_ospfd.inc +++ b/config/quagga_ospfd/quagga_ospfd.inc @@ -248,7 +248,7 @@ function quagga_ospfd_install_conf() { $carpcheckinterface = trim(find_carp_interface($ospfd_conf['carpstatusip'])); $carp_ip_status_check = << Date: Tue, 11 Jun 2013 09:28:37 -0400 Subject: And fix this bracketing --- config/quagga_ospfd/quagga_ospfd.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/quagga_ospfd') diff --git a/config/quagga_ospfd/quagga_ospfd.inc b/config/quagga_ospfd/quagga_ospfd.inc index 5e23dbf8..402e6a30 100644 --- a/config/quagga_ospfd/quagga_ospfd.inc +++ b/config/quagga_ospfd/quagga_ospfd.inc @@ -248,7 +248,7 @@ function quagga_ospfd_install_conf() { $carpcheckinterface = trim(find_carp_interface($ospfd_conf['carpstatusip'])); $carp_ip_status_check = << Date: Tue, 11 Jun 2013 10:17:38 -0400 Subject: Trim here to avoid an error from output containing a newline --- config/quagga_ospfd/quagga_ospfd.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/quagga_ospfd') diff --git a/config/quagga_ospfd/quagga_ospfd.inc b/config/quagga_ospfd/quagga_ospfd.inc index 402e6a30..aabd27a8 100644 --- a/config/quagga_ospfd/quagga_ospfd.inc +++ b/config/quagga_ospfd/quagga_ospfd.inc @@ -378,7 +378,7 @@ function quagga_ospfd_put_raw_config($conffile) { } function quagga_get_carp_status_by_ip($ipaddr) { - $iface = find_carp_interface($ipaddr); + $iface = trim(find_carp_interface($ipaddr)); if ($iface) { $status = get_carp_interface_status($iface); // If there is no status for that interface, return null. -- cgit v1.2.3