ed107a5e26
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
13 lines
359 B
Bash
Executable File
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
|