mirror of
https://github.com/optim-enterprises-bv/openstack-helm.git
synced 2025-12-25 17:27:33 +00:00
Merge "Check libvirtd based on /proc instead of /var/run"
This commit is contained in:
@@ -18,11 +18,9 @@ limitations under the License.
|
||||
|
||||
set -ex
|
||||
|
||||
if [[ -f /var/run/libvirtd.pid ]]; then
|
||||
LIBVIRTD_PID="$(< /var/run/libvirtd.pid)"
|
||||
test -d "/proc/$LIBVIRTD_PID" && \
|
||||
test 'libvirtd' = "$(< /proc/$LIBVIRTD_PID/comm)" && \
|
||||
( echo "ERROR: Libvirtd daemon is already running" && exit 1 )
|
||||
if [ -n "$(cat /proc/*/comm 2>/dev/null | grep libvirtd)" ]; then
|
||||
echo "ERROR: libvirtd daemon already running on host" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -f /var/run/libvirtd.pid
|
||||
|
||||
Reference in New Issue
Block a user