On 12/05/2010 10:53 AM, Laurent Léonard wrote:
Hi,
When libvirt-guests is being stopped, I get the following message:
$Running guests on default URI: test-vm
$Suspending guests on default URI...
$Suspending test-vm: /etc/init.d/libvirt-guests: 340: Syntax error: Bad fd
number
The size of RAM already dumped should be displayed instead.
The attached patch fixes that issue.
sleep 1
- kill -0 $virsh_pid >&/dev/null || break
+ kill -0 $virsh_pid 2>/dev/null || break
Almost. '&> word' and '>& word' on non-integer word are
bash-isms
(actually, &> is preferred, because '>&$x' is ambiguous if you
don't
know if x expands to an integer or a file name), and bash treats both as
shorthand for '> word 2>&1'. Therefore, the correct replacement for
dash (or any other POSIX shell that doesn't understand bash's extension)
would be:
kill -0 $virsh_pid >/dev/null 2>&1 || break
At any rate, ACK with that squashed in, so I pushed it.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org