[libvirt] [PATCH] libvirt-guests: Remove LISTFILE if it's empty when stopping service

Eric Blake eblake at redhat.com
Mon May 14 16:13:16 UTC 2012


On 05/14/2012 01:21 AM, Osier Yang wrote:
> $LISTFILE is created even no domain is running, and the empty
> $LISTFILE could cause improper service status.
> 
>     stoped ,with saved guests

Do we really say "stoped", or is that a typo in the commit message?

> 
> Which is not right, as there is no domain was saved.
> ---
>  tools/libvirt-guests.init.sh |   42 +++++++++++++++++++++++-------------------
>  1 files changed, 23 insertions(+), 19 deletions(-)
> 

Missing quotes:

> +    if [ -s $LISTFILE ]; then

if [ -s "$LISTFILE" ]; then


> +    else
> +        rm -f $LISTFILE

rm -f "$LISTFILE"

Looks like the rest of the patch is just reindentation after the added
if statement; ACK with the quoting fixes.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120514/fa2f795b/attachment-0001.sig>


More information about the libvir-list mailing list