kolla-ansible/docker/neutron/neutron-agents/config-scripts/config-sudoers.sh
Daneyon Hansen ed107a5e26 Adds Neutron Agents Support
Previously, the agents ran in seperate containers. Since some of
the agents create and use network namespaces, runnning them in
seperate containers has become a challenge. This patch adds
neutron agent support in a single container.

Partially Implements: blueprint compute-operation-neutron

Change-Id: If4f893abd50d90b58e8435ec2659870dce36951c
2015-04-13 07:34:12 +00:00

13 lines
359 B
Bash
Executable File

#!/bin/bash
# Neutron uses rootwrap which requires a tty for sudo.
# Since the container is running in daemon mode, a tty
# is not present and requiretty must be commented out.
if [ ! -f /var/run/sudo-modified ]; then
chmod 0640 /etc/sudoers
sed -i '/Defaults requiretty/s/^/#/' /etc/sudoers
chmod 0440 /etc/sudoers
fi
touch /var/run/sudo-modified