
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
21 lines
542 B
Bash
Executable File
21 lines
542 B
Bash
Executable File
#! /bin/sh
|
|
#
|
|
### BEGIN INIT INFO
|
|
# Required-Start: $local_fs
|
|
# Required-Stop: $local_fs
|
|
# Provides: qemu-hugefsdir
|
|
# Default-Start: 2 3 4 5
|
|
# Default-Stop: 0 6
|
|
# Short-Description: Make sure qemu gets a temp hugetblfs dir
|
|
# Description: Make sure qemu gets a temp hugetblfs dir
|
|
### END INIT INFO
|
|
|
|
mkdir -p /run/hugepages/kvm/libvirt/qemu || true
|
|
|
|
libvirt_group="libvirtd"
|
|
if getent group libvirt >/dev/null; then
|
|
libvirt_group="libvirt"
|
|
fi
|
|
|
|
chown libvirt-qemu:$libvirt_group /run/hugepages/kvm/libvirt/qemu
|