[MOS 10.0] Update ceilometer package
[openstack-build/ceilometer-build.git] / xenial / debian / ceilometer-common.postinst.in
index 623271b3d33ef4809480c44ac76e3497a34a7e11..f982fa37afe07521d887b0a1fcd348447a5c26bd 100644 (file)
@@ -4,47 +4,10 @@ set -e
 
 #PKGOS-INCLUDE#
 
-# We need to do that for ceilometer-agent-compute
-libvirt_user_group () {
-       if getent group libvirt ; then
-               LIBVIRT_GROUP=libvirt
-       elif getent group libvirtd ; then
-               LIBVIRT_GROUP=libvirtd
-       else
-               if dpkg-vendor --derives-from ubuntu ; then
-                       LIBVIRT_GROUP=libvirtd
-               else
-                       LIBVIRT_GROUP=libvirt
-               fi
-       fi
-
-       if ! getent group ${LIBVIRT_GROUP} >/dev/null; then
-               addgroup --system ${LIBVIRT_GROUP}
-       fi
-
-       # user and group libvirt runs qemu/kvm instances with
-       if ! getent group kvm >/dev/null; then
-               addgroup --quiet --system kvm
-       fi
-       if ! getent passwd libvirt-qemu >/dev/null; then
-               adduser --quiet \
-                       --system \
-                       --ingroup kvm \
-                       --quiet \
-                       --disabled-login \
-                       --disabled-password \
-                       --home /var/lib/libvirt \
-                       --no-create-home \
-                       -gecos "Libvirt Qemu" \
-                       libvirt-qemu
-       fi
-}
-
 if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ] ; then
        . /usr/share/debconf/confmodule
        pkgos_adduser nova
        pkgos_var_user_group ceilometer
-       libvirt_user_group
        adduser ceilometer nova || true
        adduser ceilometer ${LIBVIRT_GROUP} || true
        pkgos_write_new_conf ceilometer ceilometer.conf