postinst is in cinder-common 2:8.0.0-0ubuntu1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #!/bin/sh -e
if [ "$1" = "configure" ]; then
if ! getent group cinder > /dev/null 2>&1; then
addgroup --system cinder >/dev/null
fi
if ! getent passwd cinder > /dev/null 2>&1; then
adduser --system --home /var/lib/cinder --ingroup cinder --no-create-home \
--shell /bin/false cinder
fi
chown -R cinder:adm /var/log/cinder
chmod 0750 /var/log/cinder
chown -R cinder:cinder /var/lib/cinder /etc/cinder
chmod 0750 /etc/cinder
chmod 0440 /etc/sudoers.d/cinder_sudoers
chown -R root:root /etc/cinder/rootwrap.d
chmod 0755 /etc/cinder/rootwrap.d
chown root:root /etc/cinder/rootwrap.conf
if ! grep -qE "^(sql_)?connection.*" /etc/cinder/cinder.conf || \
grep -qE "^(sql_)?connection.*sqlite.*" /etc/cinder/cinder.conf
then
su -s /bin/sh -c 'cinder-manage db sync' cinder
fi
if [ -e /var/lib/cinder/cinder.sqlite ]; then
chown cinder:cinder /var/lib/cinder/cinder.sqlite
chmod 0600 /var/lib/cinder/cinder.sqlite
fi
fi
|