aboutsummaryrefslogtreecommitdiffstats
path: root/config/quagga_ospfd
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-06-11 09:07:23 -0400
committerjim-p <jimp@pfsense.org>2013-06-11 09:07:23 -0400
commitcf288f26b0f8e8146abce79a418b63be811c17b8 (patch)
tree7a2bdd97d5e2c0d56fd942048a534b4169cdde96 /config/quagga_ospfd
parent03088bd9b7d2cc55313308ff1245eb1062097987 (diff)
downloadpfsense-packages-cf288f26b0f8e8146abce79a418b63be811c17b8.tar.gz
pfsense-packages-cf288f26b0f8e8146abce79a418b63be811c17b8.tar.bz2
pfsense-packages-cf288f26b0f8e8146abce79a418b63be811c17b8.zip
Add another carp status check to quagga package.
Diffstat (limited to 'config/quagga_ospfd')
-rw-r--r--config/quagga_ospfd/quagga_ospfd.inc13
-rw-r--r--config/quagga_ospfd/quagga_ospfd.xml2
2 files changed, 14 insertions, 1 deletions
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 = <<<EOF
+CARP_STATUS=`/sbin/ifconfig ${carpcheckinterface} | /usr/bin/grep carp: | /usr/bin/awk '{print $2;}'`
+if [ \${CARP_STATUS} != "MASTER" ]; then
+ exit;
+fi
+EOF;
+ }
+
+
// Create rc.d file
$rc_file_stop = <<<EOF
if [ -e /var/run/quagga/zebra.pid ]; then
@@ -274,6 +286,7 @@ fi
killall -9 zebra 2>/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 @@
<packagegui>
<name>quagga_ospfd</name>
- <version>0.5.3</version>
+ <version>0.5.4</version>
<title>Services: Quagga OSPFd</title>
<include_file>/usr/local/pkg/quagga_ospfd.inc</include_file>
<aftersaveredirect>pkg_edit.php?xml=quagga_ospfd.xml&amp;id=0</aftersaveredirect>