]> git.proxmox.com Git - pve-common.git/commit - src/PVE/Tools.pm
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)
commited61b9d67588465f101ec043a1e224608c833e02
tree3d57214cbf7dd49a949e74d26ef8db8954c2fce9
parent3e2da216007a4f63716c0a1fae179d24816a3752
run_command: add 'quiet' parameter for omitting STD* prints

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>
src/PVE/Tools.pm