This commit is contained in:
Quentin Garnier 2014-09-30 16:50:06 +02:00
parent 42cf4f4d28
commit f2321264d5
1 changed files with 14 additions and 6 deletions

View File

@ -96,6 +96,7 @@ sub get_plugin {
'plugin:s' => { name => 'plugin' }, 'plugin:s' => { name => 'plugin' },
'list-plugin' => { name => 'list_plugin' }, 'list-plugin' => { name => 'list_plugin' },
'help' => { name => 'help' }, 'help' => { name => 'help' },
'ignore-warn-msg' => { name => 'ignore_warn_msg' },
'version' => { name => 'version' }, 'version' => { name => 'version' },
'runas:s' => { name => 'runas' }, 'runas:s' => { name => 'runas' },
'environment:s%' => { name => 'environment' }, 'environment:s%' => { name => 'environment' },
@ -249,6 +250,9 @@ sub run {
$self->{output}->add_option_msg(short_msg => "Need to specify '--plugin' option."); $self->{output}->add_option_msg(short_msg => "Need to specify '--plugin' option.");
$self->{output}->option_exit(); $self->{output}->option_exit();
} }
if (defined($self->{ignore_warn_msg})) {
$SIG{__WARN__} = sub {};
}
$self->check_relaunch(); $self->check_relaunch();
@ -292,6 +296,10 @@ Print plugin version.
Print a brief help message and exits. Print a brief help message and exits.
=item B<--ignore-warn-msg>
Perl warn messages are ignored (not displayed).
=item B<--runas> =item B<--runas>
Run the script as a different user (prefer to use directly the good user). Run the script as a different user (prefer to use directly the good user).