[supervisord] logfile_maxbytes=1MB logfile_backups=2 nodaemon=true [program:start.sh] command=/usr/bin/start.sh priority=1 autostart=true autorestart=false stdout_logfile=syslog stderr_logfile=syslog [program:rsyslogd] command=/usr/sbin/rsyslogd -n priority=2 autostart=false autorestart=false stdout_logfile=syslog stderr_logfile=syslog {# If our configuration has VLANs... #} {% if VLAN_INTERFACE %} {# Count how many VLANs require a DHCP relay agent... #} {% set ipv4_num_relays = { 'count': 0 } %} {% set ipv6_num_relays = { 'count': 0 } %} {% set d = namespace(vlan_list=[]) %} {% for (name, prefix) in VLAN_INTERFACE %} {% if name not in d.vlan_list %} {% set d.vlan_list = d.vlan_list + [name] %} {% endif %} {% endfor %} {% set vlan_list = d.vlan_list %} {# Count how many VLANs require a DHCP relay agent... #} {% set num_relays = { 'count': 0 } %} {% for vlan_name in vlan_list %} {% if VLAN and vlan_name in VLAN and VLAN[vlan_name]['dhcp_servers'] %} {% set _dummy = ipv4_num_relays.update({'count': ipv4_num_relays.count + 1}) %} {% endif %} {% if VLAN and vlan_name in VLAN and 'dhcpv6_servers' in VLAN[vlan_name] %} {% set _dummy = ipv6_num_relays.update({'count': ipv6_num_relays.count + 1}) %} {% endif %} {% endfor %} {# If one or more of the VLANs require a DHCP relay agent... #} {% if ipv4_num_relays.count > 0 or ipv6_num_relays.count > 0 %} {% include 'dhcp-relay.programs.j2' %} {% set relay_for_ipv4 = { 'flag': False } %} {% set relay_for_ipv6 = { 'flag': False } %} {% include 'dhcpv4-relay.agents.j2' %} {% include 'dhcpv6-relay.agents.j2' %} {% include 'dhcpv6-relay.monitors.j2' %} {% endif %} {% endif %}