5 if [ "$1" = "configure" ]
7 if ! getent group neutron > /dev/null 2>&1
9 addgroup --system neutron >/dev/null
11 if ! getent passwd neutron > /dev/null 2>&1
13 adduser --system --home /var/lib/neutron --ingroup neutron --no-create-home --shell /bin/false neutron
15 chown -R neutron:neutron /var/lib/neutron/
17 chown -R neutron:adm /var/log/neutron/
18 chmod 0750 /var/log/neutron/
20 chown -R root:neutron /etc/neutron/
21 # NOTE(jamespage): In order to execute unit test in decomposed
22 # vendor drivers, /etc/neutron must be readable
23 # other than by root or neutron; limitation of
24 # access to neutron.conf is sufficient as this
25 # file contains access details for DB, keystone
27 chmod 0755 /etc/neutron/
28 chmod -f 0640 /etc/neutron/neutron.conf || :
29 chown root:root /etc/neutron/rootwrap.conf
30 chown -R root:root /etc/neutron/rootwrap.d
31 chmod 0755 /etc/neutron/rootwrap.d
33 if [ -f /etc/sudoers.d/neutron_sudoers ] ; then
34 chmod 0440 /etc/sudoers.d/neutron_sudoers