X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=trusty%2Fdebian%2Fceilometer-common.postinst.in;h=623271b3d33ef4809480c44ac76e3497a34a7e11;hb=07e067df4658bcc2f5a1e5a1ce1955dc120b47a7;hp=2ba7377faa439fbf71ecf75a7b5b4ebf3849da0c;hpb=16ed4621d2da414a7a174776d353236658578ae9;p=openstack-build%2Fceilometer-build.git diff --git a/trusty/debian/ceilometer-common.postinst.in b/trusty/debian/ceilometer-common.postinst.in index 2ba7377..623271b 100644 --- a/trusty/debian/ceilometer-common.postinst.in +++ b/trusty/debian/ceilometer-common.postinst.in @@ -6,13 +6,19 @@ set -e # We need to do that for ceilometer-agent-compute libvirt_user_group () { - if dpkg-vendor --derives-from ubuntu ; then + if getent group libvirt ; then + LIBVIRT_GROUP=libvirt + elif getent group libvirtd ; then LIBVIRT_GROUP=libvirtd else - LIBVIRT_GROUP=libvirt + if dpkg-vendor --derives-from ubuntu ; then + LIBVIRT_GROUP=libvirtd + else + LIBVIRT_GROUP=libvirt + fi fi - if ! getent group libvirt >/dev/null; then + if ! getent group ${LIBVIRT_GROUP} >/dev/null; then addgroup --system ${LIBVIRT_GROUP} fi @@ -40,13 +46,16 @@ if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ] ; then pkgos_var_user_group ceilometer libvirt_user_group adduser ceilometer nova || true - adduser ceilometer libvirt || true + adduser ceilometer ${LIBVIRT_GROUP} || true pkgos_write_new_conf ceilometer ceilometer.conf - pkgos_write_new_conf ceilometer policy.json - pkgos_write_new_conf ceilometer sources.json - pkgos_write_new_conf ceilometer pipeline.yaml - pkgos_rabbit_write_conf /etc/ceilometer/ceilometer.conf DEFAULT ceilometer - ceilometer-dbsync || true + pkgos_rabbit_write_conf /etc/ceilometer/ceilometer.conf oslo_messaging_rabbit ceilometer + pkgos_write_admin_creds /etc/ceilometer/ceilometer.conf keystone_authtoken ceilometer + db_get ceilometer/configure_db + if [ "$RET" = "true" ]; then + ceilometer-dbsync || true + fi fi #DEBHELPER# + +exit 0