Signed-off-by: Dominik Csapak <[email protected]>
---
src/PVE/CLIHandler.pm | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm
index b677105..98972b7 100644
--- a/src/PVE/CLIHandler.pm
+++ b/src/PVE/CLIHandler.pm
@@ -6,6 +6,7 @@ use warnings;
use PVE::SafeSyslog;
use PVE::Exception qw(raise raise_param_exc);
use PVE::RESTHandler;
+use PVE::PTY;
use PVE::INotify;
use base qw(PVE::RESTHandler);
@@ -69,7 +70,18 @@ my $get_commands = sub {
my $complete_command_names = sub { $get_commands->($cmddef) };
-my $standard_mappings = { };
+my $standard_mappings = {
+ 'pve-password' => {
+ name => 'password',
+ desc => '<password>',
+ interactive => 1,
+ func => sub {
+ my ($value) = @_;
+ return $value if $value;
+ return PVE::PTY::get_confirmed_password();
+ },
+ },
+};
sub get_standard_mapping {
my ($name, $base) = @_;
--
2.11.0
_______________________________________________
pve-devel mailing list
[email protected]
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel