]> review.fuel-infra Code Review - openstack-build/ceilometer-build.git/commitdiff
Creates the correct libvirt group if the package is installed in Ubuntu.
authorThomas Goirand <thomas@goirand.fr>
Thu, 30 May 2013 16:13:58 +0000 (00:13 +0800)
committerThomas Goirand <thomas@goirand.fr>
Thu, 30 May 2013 16:13:58 +0000 (00:13 +0800)
Rewritten-From: 3577e25dd97c609c92d2da1a71448148b4acea6e

xenial/debian/ceilometer-common.postinst.in
xenial/debian/changelog

index aa927b09b851ee07a08848d89fcf935cb43acd9b..e4f3dafd60e30e88ac599ee4c1ea278c872176d2 100644 (file)
@@ -6,8 +6,14 @@ set -e
 
 # We need to do that for ceilometer-agent-compute
 libvirt_user_group () {
+       if dpkg-vendor --derives-from ubuntu ; then
+               LIBVIRT_GROUP=libvirtd
+       else
+               LIBVIRT_GROUP=libvirt
+       fi
+
        if ! getent group libvirt >/dev/null; then
-               addgroup --system libvirt
+               addgroup --system ${LIBVIRT_GROUP}
        fi
 
        # user and group libvirt runs qemu/kvm instances with
index 5f551a8ea1d60577f6ec6ee5a958cef820bf4b01..4d6ccccc930f5e9f5d31ae90a458348d76ed6dcd 100644 (file)
@@ -5,6 +5,7 @@ ceilometer (2013.1-4) unstable; urgency=low
   * Ran wrap-and-sort to clean debian/control.
   * Replaced pkgos_var_user_group nova by pkgos_adduser, as we don't want to
     create the log / lib dirs of nova.
+  * Creates the correct libvirt group if the package is installed in Ubuntu.
 
  -- Thomas Goirand <zigo@debian.org>  Mon, 27 May 2013 11:07:59 +0800