X-Git-Url: https://git.proxmox.com/?p=pve-access-control.git;a=blobdiff_plain;f=pveum;h=196fb3a614d5f71c1b4057498d8ac641a80d3529;hp=4ab2e0c4c4b9672d68fa987103ed4bdba7b29f44;hb=98007830ee0282a58e6604632df350bf60636748;hpb=90399ca489102176017cd2bd5ab0f8666caa092a diff --git a/pveum b/pveum index 4ab2e0c..196fb3a 100755 --- a/pveum +++ b/pveum @@ -5,22 +5,9 @@ use warnings; use PVE::CLI::pveum; -my $read_password = sub { - - # return $ENV{PVE_PW_TICKET} if defined($ENV{PVE_PW_TICKET}); - - my $term = new Term::ReadLine ('pveum'); - my $attribs = $term->Attribs; - $attribs->{redisplay_function} = $attribs->{shadow_redisplay}; - my $input = $term->readline('Enter new password: '); - my $conf = $term->readline('Retype new password: '); - die "Passwords do not match.\n" if ($input ne $conf); - return $input; -}; - my $prepare = sub { # autmatically generate the private key if it does not already exists PVE::Cluster::gen_auth_key(); }; -PVE::CLI::pveum->run_cli($read_password, undef, $prepare); +PVE::CLI::pveum->run_cli_handler(prepare => $prepare);