[Pkg-opennebula-devel] [PATCH] Check if libvirt group exists
Łukasz Oleś
lukaszoles at gmail.com
Thu Dec 30 00:08:21 UTC 2010
Hello,
when installing opennebula-node on node without libvirt but with xen-utils I'm
getting:
adduser: The group `libvirt' does not exist.
dpkg: error processing opennebula-node (--configure):
subprocess installed post-installation script returned error exit status 1
Following patch fixes it:
diff --git a/debian/opennebula-node.postinst.in b/debian/opennebula-
node.postinst.in
index 595ec39..63e94e9 100644
--- a/debian/opennebula-node.postinst.in
+++ b/debian/opennebula-node.postinst.in
@@ -7,7 +7,7 @@ ONE_GROUP=cloud
ONE_USER=oneadmin
if [ "$1" = "configure" ]; then
- if ! getent group @LIBVIRTGRP@ | cut -f4 -d: | grep -q '\<$ONE_USER\>';
then
+ if getent group @LIBVIRTGRP@ >/dev/null && ! getent group @LIBVIRTGRP@ |
cut -f4 -d: | grep -q '\<$ONE_USER\>'; then
adduser $ONE_USER @LIBVIRTGRP@
fi
fi
Regards,
--
Łukasz Oleś
More information about the Pkg-opennebula-devel
mailing list