From 4daa7d1f5ed5a8f1dc8ed2b6c3c72af692d7a6bb Mon Sep 17 00:00:00 2001 From: Seyeong Kim Date: Wed, 7 Feb 2018 12:07:13 +0900 Subject: [PATCH] Support libvirt group instead of libvirtd when hugepages set up Adding check code if there is libvirt group or libvirtd group after pike release. Currently getting error when setting hugepage option in pike Change-Id: I324b7d95c659ea047b0fe8e25c8e2faad1077f1a Closes-Bug: #1747805 --- files/qemu-hugefsdir | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/files/qemu-hugefsdir b/files/qemu-hugefsdir index dcac085c..62aad8a2 100755 --- a/files/qemu-hugefsdir +++ b/files/qemu-hugefsdir @@ -11,4 +11,10 @@ ### END INIT INFO mkdir -p /run/hugepages/kvm/libvirt/qemu || true -chown libvirt-qemu:libvirtd /run/hugepages/kvm/libvirt/qemu + +libvirt_group="libvirtd" +if getent group libvirt >/dev/null; then + libvirt_group="libvirt" +fi + +chown libvirt-qemu:$libvirt_group /run/hugepages/kvm/libvirt/qemu