File tree Expand file tree Collapse file tree 3 files changed +55
-9
lines changed
service/templates/OPNsense/Quagga Expand file tree Collapse file tree 3 files changed +55
-9
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ # Service wrapper for restarting frr service
3+ # This wrapper is needed to react on specific service interactions through watchfrr.
4+ # Startup details with watchfrr enabled (default):
5+ # 1. "service frr start" calls "service frr start watchfrr"
6+ # 2. watchfrr once started calls "service frr restart all"
7+ # 3. "restart all" need to loop the list of $frr_daemons to start each
8+ # of then
9+ # 4. vtysh -b is executed to load boot startup configuration
10+
11+ /usr/sbin/service frr restart $1
12+
13+ # If started service is ospfd, e.g. process error
14+ if [ " $1 " = " ospfd" ]; then
15+ logger -t frr_wrapper " WATCHFRR - OSPFD - Starting CARP event handler now"
16+ /usr/local/opnsense/scripts/frr/carp_event_handler
17+ fi
18+ # If frr starts up
19+ if [ " $1 " = " all" ]; then
20+ /usr/bin/logger -t frr_wrapper " WATCHFRR - STARTUP - Starting CARP event handler in 1 sec."
21+ (
22+ sleep 1
23+ /usr/bin/logger -t frr_wrapper " WATCHFRR - STARTUP - Starting CARP event handler now"
24+ /usr/local/opnsense/scripts/frr/carp_event_handler
25+ ) &
26+ fi
27+ exit $?
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ # Service wrapper for starting frr service
3+ # This wrapper is needed to react on specific service interactions through watchfrr.
4+ # Startup details with watchfrr enabled (default):
5+ # 1. "service frr start" calls "service frr start watchfrr"
6+ # 2. watchfrr once started calls "service frr restart all"
7+ # 3. "restart all" need to loop the list of $frr_daemons to start each
8+ # of then
9+ # 4. vtysh -b is executed to load boot startup configuration
10+
11+ /usr/sbin/service frr start $1
12+
13+ # If started service is ospfd, e.g. process error
14+ if [ " $1 " = " ospfd" ]; then
15+ logger -t frr_wrapper " WATCHFRR - OSPFD - Starting CARP event handler now"
16+ /usr/local/opnsense/scripts/frr/carp_event_handler
17+ fi
18+ # If frr starts up
19+ if [ " $1 " = " all" ]; then
20+ /usr/bin/logger -t frr_wrapper " WATCHFRR - STARTUP - Starting CARP event handler in 1 sec."
21+ (
22+ sleep 1
23+ /usr/bin/logger -t frr_wrapper " WATCHFRR - STARTUP - Starting CARP event handler now"
24+ /usr/local/opnsense/scripts/frr/carp_event_handler
25+ ) &
26+ fi
27+ exit $?
Original file line number Diff line number Diff line change @@ -18,15 +18,7 @@ frr_carp_demote="{%
1818 if not helpers.empty('OPNsense.quagga.ospf.carp_demote') %} ospfd{% endif %}{%
1919 if not helpers.empty('OPNsense.quagga.ospf6.carp_demote') %} ospf6d{% endif
2020%}"
21- start_postcmd='
22- # XXX rc.d/frr declares its own post command we need to hook first
23- start_postcmd
24- # XXX rc.d/frr iterates through daemons so we need to hook last one
25- if [ "${frr_daemons}" != "${frr_daemons% ${name}}" ]; then
26- echo "Starting CARP event handler now"
27- /usr/local/opnsense/scripts/frr/carp_event_handler
28- fi
29- '
21+ watchfrr_flags="-r /usr/local/opnsense/scripts/frr/frr_restart.shbB%s -s /usr/local/opnsense/scripts/frr/frr_start.shbB%s -k /usr/sbin/servicebBfrrbBstopbB%s -b bB -t 30"
3022{% if OPNsense.quagga.general.enablesnmp == '1' %}
3123zebra_flags="${zebra_flags} -M snmp"
3224bgpd_flags="${bgpd_flags} -M snmp"
You can’t perform that action at this time.
0 commit comments