]> review.fuel-infra Code Review - openstack-build/cinder-build.git/blob - trusty/debian/cinder-common.postinst
Remove 'cinder-manage db sync' from cinder-common.postinst
[openstack-build/cinder-build.git] / trusty / debian / cinder-common.postinst
1 #!/bin/sh -e
2
3 if [ "$1" = "configure" ]; then
4     if ! getent group cinder > /dev/null 2>&1; then
5         addgroup --system cinder >/dev/null
6     fi
7
8     if ! getent passwd cinder > /dev/null 2>&1; then
9         adduser --system --home /var/lib/cinder --ingroup cinder --no-create-home \
10             --shell /bin/false cinder
11     fi
12
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
21
22     if [ -e /var/lib/cinder/cinder.sqlite ]; then
23         chown cinder:cinder /var/lib/cinder/cinder.sqlite
24         chmod 0600 /var/lib/cinder/cinder.sqlite
25     fi
26 fi
27
28 #DEBHELPER#