tripleo-image-elements/elements/neutron/install.d/neutron-source-install/76-neutron
Giulio Fidente b6b51702fd Ensure neutron rootwrap.d symlink is not nested
Before this change, if /etc/neutron/rootwrap.d existed already and
was a dir or a link to a dir, an additional symlink, named rootwrap.d
was created within the rootwrap.d dir, eventually causing the
neutron-rootwrap command to fail and exit with non-zero.

Change-Id: I2f11d7e93ef1445afd1a58e4dd110f7369ec93ab
2014-10-16 16:03:31 +02:00

23 lines
824 B
Bash
Executable File

#!/bin/bash
set -eux
# for BUG: https://bugs.launchpad.net/neutron/+bug/1225232
echo "qpid-python" | tee -a /opt/stack/neutron/requirements.txt
os-svc-install $NEUTRON_EXTRA_INSTALL_OPTS -i "$NEUTRON_VENV_DIR" -u neutron -r /opt/stack/neutron
ln -sf $NEUTRON_VENV_DIR/bin/neutron-rootwrap /usr/bin/neutron-rootwrap
ln -sft /etc/neutron $NEUTRON_VENV_DIR/etc/neutron/rootwrap.d
cp /opt/stack/neutron/etc/api-paste.ini /etc/neutron/api-paste.ini
cp /opt/stack/neutron/etc/policy.json /etc/neutron/policy.json
ln -s $NEUTRON_VENV_DIR/bin/neutron-db-manage /usr/local/bin/neutron-db-manage
echo "neutron ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/neutron
echo "Defaults:neutron !requiretty" >> /etc/sudoers.d/neutron
chmod 0440 /etc/sudoers.d/neutron
visudo -c
add-selinux-path-substitution /usr/bin $NEUTRON_VENV_DIR/bin