For example, this seems to work well:

doug@goom-i5:~/config/usr/lib/libvirt$ diff libvirt-guests.sh.original 
libvirt-guests.sh
114,124c114,126
<     i=${CONNECT_RETRIES}
<     while [ $i -gt 0 ]; do
<         run_virsh "$uri" connect 2>/dev/null
<         if [ $? -eq 0 ]; then
<             return 0;
<         fi
<         sleep ${RETRIES_SLEEP}
<         eval_gettext "Unable to connect to libvirt currently. Retrying .. \$i"
<         i=$(($i-1))
<     done
<     eval_gettext "Can't connect to \$uri. Skipping."
---
>     if `pidof libvirtd 1>/dev/null`; then
>         i=${CONNECT_RETRIES}
>         while [ $i -gt 0 ]; do
>             run_virsh "$uri" connect 2>/dev/null
>             if [ $? -eq 0 ]; then
>                 return 0;
>             fi
>             sleep ${RETRIES_SLEEP}
>             eval_gettext "Unable to connect to libvirt currently. Retrying .. 
> \$i"
>             i=$(($i-1))
>         done
>         eval_gettext "Can't connect to \$uri. Skipping."
>     fi

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1854653

Title:
  during shutdown libvirt-guests.sh shouldn't run if libvirtd isn't
  running

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1854653/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to