mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/frr: annotate and fix weird rc.d handling
While here move two files out of legacy "quagga" dirs.
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
PLUGIN_NAME= frr
|
||||
PLUGIN_VERSION= 1.34
|
||||
PLUGIN_REVISION= 2
|
||||
PLUGIN_REVISION= 1
|
||||
PLUGIN_COMMENT= The FRRouting Protocol Suite
|
||||
PLUGIN_DEPENDS= frr8
|
||||
PLUGIN_MAINTAINER= franz.fabian.94@gmail.com
|
||||
|
||||
@@ -29,7 +29,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#}
|
||||
|
||||
<script src="{{ cache_safe('/ui/js/quagga/diagnostics_utils.js') }}"></script>
|
||||
<script src="{{ cache_safe('/ui/js/frr/diagnostics_utils.js') }}"></script>
|
||||
|
||||
<style>
|
||||
.searchbox {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{% if helpers.exists('OPNsense.quagga.general.enabled') and OPNsense.quagga.general.enabled == '1' %}
|
||||
zebra_setup="/usr/local/opnsense/scripts/quagga/setup.sh"
|
||||
# XXX rc.d/frr splits up defunct "frr" service into frr_daemons
|
||||
# and we always start "zebra" so for now this works:
|
||||
zebra_setup="/usr/local/opnsense/scripts/frr/setup.sh"
|
||||
frr_enable="YES"
|
||||
{% if helpers.exists('OPNsense.quagga.general.enablecarp') and OPNsense.quagga.general.enablecarp == '1' %}
|
||||
start_precmd="ifconfig | grep 'carp: MASTER'"
|
||||
@@ -16,13 +18,21 @@ frr_carp_demote="{%
|
||||
if not helpers.empty('OPNsense.quagga.ospf.carp_demote') %} ospfd{% endif %}{%
|
||||
if not helpers.empty('OPNsense.quagga.ospf6.carp_demote') %} ospf6d{% endif
|
||||
%}"
|
||||
start_postcmd="/usr/local/opnsense/scripts/frr/carp_event_handler"
|
||||
{% else %}
|
||||
frr_enable="NO"
|
||||
{% endif %}
|
||||
start_postcmd='
|
||||
# XXX rc.d/frr declares its own post command we need to hook first
|
||||
start_postcmd
|
||||
# XXX rc.d/frr iterates through daemons so we need to hook last one
|
||||
if [ "${frr_daemons}" != "${frr_daemons% ${name}}" ]; then
|
||||
echo "Starting CARP event handler now"
|
||||
/usr/local/opnsense/scripts/frr/carp_event_handler
|
||||
fi
|
||||
'
|
||||
{% if OPNsense.quagga.general.enablesnmp == '1' %}
|
||||
zebra_flags="${zebra_flags} -M snmp"
|
||||
bgpd_flags="${bgpd_flags} -M snmp"
|
||||
ospf_flags="${ospf_flags} -M snmp"
|
||||
ospf6_flags="${ospf6_flags} -M snmp"
|
||||
{% endif %}
|
||||
{% else %}
|
||||
frr_enable="NO"
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user