mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
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:
parent
fff4682965
commit
e2d24e8de4
@ -143,12 +143,15 @@ start() {
|
|||||||
|
|
||||||
while read uri list; do
|
while read uri list; do
|
||||||
configured=false
|
configured=false
|
||||||
|
set -f
|
||||||
for confuri in $URIS; do
|
for confuri in $URIS; do
|
||||||
|
set +f
|
||||||
if [ "x$confuri" = "x$uri" ]; then
|
if [ "x$confuri" = "x$uri" ]; then
|
||||||
configured=true
|
configured=true
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
set +f
|
||||||
if ! "$configured"; then
|
if ! "$configured"; then
|
||||||
eval_gettext "Ignoring guests on \$uri URI"; echo
|
eval_gettext "Ignoring guests on \$uri URI"; echo
|
||||||
continue
|
continue
|
||||||
@ -241,7 +244,9 @@ stop() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
: >"$LISTFILE"
|
: >"$LISTFILE"
|
||||||
|
set -f
|
||||||
for uri in $URIS; do
|
for uri in $URIS; do
|
||||||
|
set +f
|
||||||
eval_gettext "Running guests on \$uri URI: "
|
eval_gettext "Running guests on \$uri URI: "
|
||||||
|
|
||||||
if [ "x$uri" = xdefault ] && [ ! -x "$libvirtd" ]; then
|
if [ "x$uri" = xdefault ] && [ ! -x "$libvirtd" ]; then
|
||||||
@ -265,6 +270,7 @@ stop() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
set +f
|
||||||
|
|
||||||
while read uri list; do
|
while read uri list; do
|
||||||
if "$suspending"; then
|
if "$suspending"; then
|
||||||
@ -286,10 +292,13 @@ stop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
gueststatus() {
|
gueststatus() {
|
||||||
|
set -f
|
||||||
for uri in $URIS; do
|
for uri in $URIS; do
|
||||||
|
set +f
|
||||||
echo "* $uri URI:"
|
echo "* $uri URI:"
|
||||||
retval run_virsh "$uri" list || echo
|
retval run_virsh "$uri" list || echo
|
||||||
done
|
done
|
||||||
|
set +f
|
||||||
}
|
}
|
||||||
|
|
||||||
# rh_status
|
# rh_status
|
||||||
|
Loading…
Reference in New Issue
Block a user