[pve-devel] [PATCH V2 storage 10/10] Add read_password in CLI.

Wolfgang Link w.link at proxmox.com
Fri Mar 16 10:22:59 CET 2018


---
 PVE/CLI/pvesm.pm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/PVE/CLI/pvesm.pm b/PVE/CLI/pvesm.pm
index e6c37ea..5774364 100755
--- a/PVE/CLI/pvesm.pm
+++ b/PVE/CLI/pvesm.pm
@@ -17,6 +17,7 @@ use PVE::API2::Storage::Content;
 use PVE::API2::Storage::Status;
 use PVE::API2::Storage::Scan;
 use PVE::JSONSchema qw(get_standard_option);
+use PVE::PTY;
 
 use PVE::CLIHandler;
 
@@ -26,6 +27,10 @@ my $KNOWN_EXPORT_FORMATS = ['raw+size', 'tar+size', 'qcow2+size', 'vmdk+size', '
 
 my $nodename = PVE::INotify::nodename();
 
+sub read_password {
+    return PVE::PTY::read_password("Enter Password: ");
+}
+
 sub setup_environment {
     PVE::RPCEnvironment->setup_default_cli_env();
 }
-- 
2.11.0





More information about the pve-devel mailing list