blob: bc1e3982730013fa4d6706ef9232da157d306358 [file] [log] [blame]
post-start script
LIBVIRTD_SYSCONFIG=/etc/default/libvirtd
if [ -f $LIBVIRTD_SYSCONFIG ]; then
. $LIBVIRTD_SYSCONFIG
fi
sockfile="${SOCKFILE:-/var/run/libvirt/libvirt-sock}"
sockfile_check_retries=5
initsleep=2
while [ ! -S $sockfile ] ; do
sleep ${initsleep}
initsleep=$((${initsleep}*2))
if ! sockfile_check_retries=`expr $sockfile_check_retries - 1`; then
echo "Giving up waiting for $sockfile."
stop; exit 1
fi
done
echo "$sockfile ready."
end script