Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 353011

Summary: app-emulation/libvirt-0.8.7-r1: error message on libvirtd stop: line 90: [: missing `]'
Product: Gentoo Linux Reporter: Martin Dummer <martin.dummer>
Component: [OLD] ServerAssignee: Doug Goldstein (RETIRED) <cardoe>
Status: RESOLVED FIXED    
Severity: normal CC: jlec, shrdlu, virtualization
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Martin Dummer 2011-01-28 07:25:06 UTC
When libvirtd is stopped there is an error message due to a init script error

Reproducible: Always

Steps to Reproduce:
1. /etc/init.d/libvirtd start
2. LANG=C /etc/init.d/libvirtd stop
3. see the following output

machine ~ # /etc/init.d/libvirtd stop
libvirtd          | * Stopping libvirtd ...
libvirtd          |/etc/init.d/libvirtd: line 90: [: missing `]'                                                   [ ok ]
machine ~ # 
Actual Results:  
libvirtd stops but new feature "stop libvirtd managed networks" does not work

Expected Results:  
stopping without script errors

This can be avoided with the follogin patch 


--- /etc/init.d/libvirtd.orig   2011-01-28 08:16:14.574700242 +0100
+++ /etc/init.d/libvirtd        2011-01-28 08:16:28.930700246 +0100
@@ -88,7 +88,7 @@
 
        NET_COUNT="$(libvirtd_net_count)"
        if [ "${LIBVIRTD_NET_SHUTDOWN}" != "no" \
-               && "${NET_COUNT}" != "0" ]; then
+               -a "${NET_COUNT}" != "0" ]; then
 
                einfo " Shutting down network(s):"
                        for NET_NAME in $(libvirtd_net_list); do
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2011-02-01 21:09:10 UTC
Fixed in tree. Thanks.