c00488143d
Not all Linux flavors accept the same type of configuration to manage NICs. The amphora-agent must be able to distinguish between different Linux flavors and choose the appropriate type of jinja2 NIC configuration template for each one, respectively. Up until now, The amphora-agent had no notion of the operating system it is running on, therefore it used NIC configuration templates that only match Debian based Linux flavors (mostly Ubuntu). Making it unusable for flavors such as RHEL, Fedora and CentOS. This fix enhances how the amphora-agent is handling NIC hot plugs. It will use the appropriate jinja2 template by checking the Amphora distribution name when needed. Co-Authored-By: Michael Johnson <johnsomor@gmail.com> Closes-Bug #1548070 Change-Id: Id99948aec64656a0532afc68e146f0610bff1378
13 lines
285 B
Bash
Executable File
13 lines
285 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
if [[ -d /etc/rsyslog.d ]] && [[ ! -e /etc/rsyslog.d/49-haproxy.conf ]]; then
|
|
cat >> /etc/rsyslog.d/49-haproxy.conf <<EOF
|
|
# Send HAProxy messages to a dedicated logfile
|
|
if \$programname startswith 'haproxy' then /var/log/haproxy.log
|
|
&~
|
|
EOF
|
|
fi
|