[libvirt] virsh ttyconsole [node] has rc of 1?

Daniel P. Berrange berrange at redhat.com
Wed Apr 15 16:22:24 UTC 2009


On Wed, Apr 15, 2009 at 12:18:55PM -0400, Darryl L. Pierce wrote:
> I have a script that's breaking when trying to get the ttyconsole for a
> node. The script gets the console by invoking:
> 
> virsh ttyconsole [nodename]
> 
> The script also has trap on error enabled, and the above command has a
> return code of 1. This is causing the script to exit at that point.
> 
> Is this a bug? Or is there a reason that return code is 1 and not 0?

It is a bug - the ttyconsole method is missing a 'ret = TRUE' line
to set exit status upon success


Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the libvir-list mailing list