libvirt-guests: avoid globbing when splitting $URIS

* tools/libvirt-guests.init.sh (start, stop, gueststatus): Avoid
shell globbing, since valid URIs can contain '?'.
This commit is contained in:
Eric Blake 2011-03-11 14:06:09 -07:00
parent fff4682965
commit e2d24e8de4

View File

@ -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