[pve-devel] [PATCH qemu-server 1/1] use get_confirmed_password

Dominik Csapak d.csapak at proxmox.com
Tue Jun 12 12:33:51 CEST 2018


Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 PVE/CLI/qm.pm | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/PVE/CLI/qm.pm b/PVE/CLI/qm.pm
index c017a59..fe8981f 100755
--- a/PVE/CLI/qm.pm
+++ b/PVE/CLI/qm.pm
@@ -674,11 +674,7 @@ sub param_mapping {
     my $cipassword_map = ['cipassword', sub {
 	my ($value) = @_;
 	return $value if $value;
-
-	my $pw = PVE::PTY::read_password('New cloud-init user password: ');
-	my $pw2 = PVE::PTY::read_password('Repeat password: ');
-	die "passwords do not match\n" if $pw ne $pw2;
-	return $pw;
+	return PVE::PTY::get_confirmed_password();
     }, '<password>', 1];
     my $mapping = {
 	'update_vm' => [$ssh_key_map, $cipassword_map],
-- 
2.11.0




More information about the pve-devel mailing list