tripleo-image-elements/elements/neutron-dhcp-agent/install.d/neutron-source-install/80-neutron-dhcp-agent

13 lines
515 B
Bash
Executable File

#!/bin/bash
set -eux
# If NEUTRON_VENV_DIR is set, then need to fix up the dhcp.filters rootwrap file to allow dhcp-agent to
# kill processes when networks are deleted.
if [ -n "${NEUTRON_VENV_DIR}" ]
then
sed -i "s, /usr/bin/python, ${NEUTRON_VENV_DIR}/bin/python," /etc/neutron/rootwrap.d/dhcp.filters
fi
install-packages dnsmasq dnsmasq-utils
os-svc-daemon -i "$NEUTRON_VENV_DIR" -n neutron-dhcp-agent -u neutron -c neutron-dhcp-agent -- --config-file /etc/neutron/dhcp_agent.ini --config-dir /etc/neutron