+# 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_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