]> xenbits.xensource.com Git - libvirt.git/commitdiff
tools: Ignore newlines in libvirt-guests.sh guest list
authorStefan Bader <stefan.bader@canonical.com>
Fri, 7 Oct 2016 07:56:32 +0000 (09:56 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 10 Oct 2016 08:52:08 +0000 (16:52 +0800)
The list file expects all guest UUIDs on the same line as the URI
which the guests run on. This does not happen when the list is
echo'ed in quotes. When stripping the quotes, newlines get transformed
into spaces. Without this, only the first guest on the list is actually
handled.

Based on a fix by Omar Siam <simar@gmx.net>

Bug-Ubuntu: http://bugs.launchpad.net/bugs/1591695

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
tools/libvirt-guests.sh.in

index 7f74b85c19d732157b49950ac6ec33aaea52b026..7380b4b809b78ebdbc566974747b84f8877c7659 100644 (file)
@@ -499,7 +499,7 @@ stop() {
         fi
 
         if [ -n "$list" ]; then
-            echo "$uri" "$list" >>"$LISTFILE"
+            echo "$uri" $list >>"$LISTFILE"
         fi
     done
     set +f