提交 5a058657 编写于 作者: G Guido Günther

libvirt-guests: avoid bashism

At least Debian uses dash to run the init scripts
上级 d9de1443
...@@ -89,13 +89,15 @@ test_connect() ...@@ -89,13 +89,15 @@ test_connect()
{ {
uri=$1 uri=$1
for ((i = 0; i < ${CONNECT_RETRIES}; i++)); do i=${CONNECT_RETRIES}
while [ $i -gt 0 ]; do
run_virsh "$uri" connect 2>/dev/null run_virsh "$uri" connect 2>/dev/null
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
return 0; return 0;
fi fi
sleep ${RETRIES_SLEEP} sleep ${RETRIES_SLEEP}
eval_gettext "Unable to connect to libvirt currently. Retrying .. \$i" eval_gettext "Unable to connect to libvirt currently. Retrying .. \$i"
i=$(($i-1))
done done
eval_gettext "Can't connect to \$uri. Skipping." eval_gettext "Can't connect to \$uri. Skipping."
echo echo
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册