3 if [ "$1" = "configure" ]; then
4 if ! getenv group cinder > /dev/null 2>&1; then
5 addgroup --system cinder >/dev/null
8 if ! getenv passwd cinder > /dev/null 2>&1; then
9 adduser --system --home /var/lib/cinder --ingroup cinder --no-create-home \
10 --shell /bin/false cinder
13 chown -R cinder:adm /var/log/cinder
14 chmod 0750 /var/log/cinder
15 chown -R cinder:cinder /var/lib/cinder /etc/cinder
16 chmod 0750 /etc/cinder
17 chmod 0440 /etc/sudoers.d/cinder_sudoers
18 chown -R root:root /etc/cinder/rootwrap.d
19 chmod 0755 /etc/cinder/rootwrap.d
20 chown root:root /etc/cinder/rootwrap.conf
22 if ! grep -q sql_connection /etc/cinder/cinder.conf
24 su -s /bin/sh -c 'cinder-manage db sync' cinder
27 if [ -e /var/lib/cinder/cinder.sqlite ]; then
28 chown cinder:cinder /var/lib/cinder/cinder.sqlite
29 chmod 0600 /var/lib/cinder/cinder.sqlite