]> git.proxmox.com Git - pve-common.git/commitdiff
run_command: add 'quiet' parameter for omitting STD* prints
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 19 Dec 2017 10:50:16 +0000 (11:50 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 19 Dec 2017 12:09:07 +0000 (13:09 +0100)
Without this patch we printed to STDOUT and STDERR, respectively, if
no $outfunc or $errfunc was passed.

Sometimes it's useful if one, or even both, of those prints can
be suppressed, currently this can only be done by either using an array
of arrays or a whole string for the command and redirecting STDOUT
and STDERR.

Add a 'quiet' option which allows to do this in an easier way.
It allows to silent STDERR or STDOUT or both.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>

No differences found