提交 e2d24e8d 编写于 作者: E Eric Blake

libvirt-guests: avoid globbing when splitting $URIS

* tools/libvirt-guests.init.sh (start, stop, gueststatus): Avoid
shell globbing, since valid URIs can contain '?'.
上级 fff46829
......@@ -143,12 +143,15 @@ start() {
while read uri list; do
configured=false
set -f
for confuri in $URIS; do
set +f
if [ "x$confuri" = "x$uri" ]; then
configured=true
break
fi
done
set +f
if ! "$configured"; then
eval_gettext "Ignoring guests on \$uri URI"; echo
continue
......@@ -241,7 +244,9 @@ stop() {
fi
: >"$LISTFILE"
set -f
for uri in $URIS; do
set +f
eval_gettext "Running guests on \$uri URI: "
if [ "x$uri" = xdefault ] && [ ! -x "$libvirtd" ]; then
......@@ -265,6 +270,7 @@ stop() {
fi
fi
done
set +f
while read uri list; do
if "$suspending"; then
......@@ -286,10 +292,13 @@ stop() {
}
gueststatus() {
set -f
for uri in $URIS; do
set +f
echo "* $uri URI:"
retval run_virsh "$uri" list || echo
done
set +f
}
# rh_status
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册