[pve-devel] RBDPlugin.pm: ceph ls

Dietmar Maurer dietmar at proxmox.com
Fri Jun 15 10:37:10 CEST 2012


> > I read that already but could you give a hint how to prevent PVE from
> > throwing an error if STDERR contains a specific string?
> 
> exec {
>   run_comand(..., errmsg => 'MARKER');
> };
> my $err = $@;
> 
> if ($err =~ m/^MARKER:.*specific string/) ...

This only works if the string is the last line print to STDERR.

If you want to parse the whole STDERR output, you can use errfunc().

- Dietmar




More information about the pve-devel mailing list