From 2b8b0fe7e8b6ab86125ee4acd0de2ec3c1d3637e Mon Sep 17 00:00:00 2001 From: Remi Bergsma Date: Wed, 21 Sep 2016 17:48:27 +0200 Subject: [PATCH] Improve detection of qemu-guest-agent process --- .../patches/debian/config/etc/init.d/cloud-early-config | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cosmic-core/systemvm/patches/debian/config/etc/init.d/cloud-early-config b/cosmic-core/systemvm/patches/debian/config/etc/init.d/cloud-early-config index 880e1a7b89..ae69e7bc17 100755 --- a/cosmic-core/systemvm/patches/debian/config/etc/init.d/cloud-early-config +++ b/cosmic-core/systemvm/patches/debian/config/etc/init.d/cloud-early-config @@ -106,10 +106,13 @@ get_boot_params() { fi # Make sure the Qemu guest agent is running, or else we will be waiting forever - ps aux | grep qemu | grep -v grep > /dev/null 2>&1 - if [ $? -gt 0 ]; then + if ! /etc/init.d/qemu-guest-agent status &>/dev/null; then log_it "Starting Qemu guest agent" /etc/init.d/qemu-guest-agent start + if [ $? -gt 0 ]; then + log_it "Starting Qemu Guest Agent failed!" + return false + fi else log_it "Good! Qemu guest agent already running." fi