all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager 1/1] use Term::ReadLine->new() only once
       [not found] <20250902182031.1080266-1-bugzilla.proxmox.com@lookshe.org>
@ 2025-09-02 18:20 ` Sebastian Luksch via pve-devel
  2025-09-02 18:20 ` [pve-devel] [PATCH pmg-api " Sebastian Luksch via pve-devel
  1 sibling, 0 replies; 2+ messages in thread
From: Sebastian Luksch via pve-devel @ 2025-09-02 18:20 UTC (permalink / raw)
  To: pve-devel; +Cc: Sebastian Luksch

[-- Attachment #1: Type: message/rfc822, Size: 6067 bytes --]

From: Sebastian Luksch <bugzilla.proxmox.com@lookshe.org>
To: pve-devel@lists.proxmox.com
Cc: Sebastian Luksch <bugzilla.proxmox.com@lookshe.org>
Subject: [PATCH manager 1/1] use Term::ReadLine->new() only once
Date: Tue,  2 Sep 2025 20:20:30 +0200
Message-ID: <20250902182031.1080266-2-bugzilla.proxmox.com@lookshe.org>

---
 PVE/CLI/pvenode.pm | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/PVE/CLI/pvenode.pm b/PVE/CLI/pvenode.pm
index 76b05887..466170f4 100644
--- a/PVE/CLI/pvenode.pm
+++ b/PVE/CLI/pvenode.pm
@@ -97,6 +97,7 @@ __PACKAGE__->register_method({
         my ($param) = @_;
 
         my $custom_directory = 0;
+        my $term = Term::ReadLine->new('pvenode');
         if (!$param->{directory}) {
             my $directories = PVE::API2::ACMEAccount->get_directories({});
             print "Directory endpoints:\n";
@@ -108,7 +109,6 @@ __PACKAGE__->register_method({
             }
             print $i, ") Custom\n";
 
-            my $term = Term::ReadLine->new('pvenode');
             my $get_dir_selection = sub {
                 my $selection = $term->readline("Enter selection: ");
                 if ($selection =~ /^(\d+)$/) {
@@ -137,7 +137,6 @@ __PACKAGE__->register_method({
         if ($meta->{termsOfService}) {
             my $tos = $meta->{termsOfService};
             print "Terms of Service: $tos\n";
-            my $term = Term::ReadLine->new('pvenode');
             my $agreed = $term->readline('Do you agree to the above terms? [y|N]: ');
             die "Cannot continue without agreeing to ToS, aborting.\n"
                 if ($agreed !~ /^y$/i);
@@ -149,7 +148,6 @@ __PACKAGE__->register_method({
 
         my $eab_enabled = $meta->{externalAccountRequired};
         if (!$eab_enabled && $custom_directory) {
-            my $term = Term::ReadLine->new('pvenode');
             my $agreed =
                 $term->readline('Do you want to use external account binding? [y|N]: ');
             $eab_enabled = ($agreed =~ /^y$/i);
@@ -158,7 +156,6 @@ __PACKAGE__->register_method({
         }
         if ($eab_enabled) {
             print "You should have received a key id and a key from your CA.\n";
-            my $term = Term::ReadLine->new('pvenode');
             my $eab_kid = $term->readline('Enter EAB key id: ');
             my $eab_hmac_key = $term->readline('Enter EAB key: ');
 
-- 
2.30.2



[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] [PATCH pmg-api 1/1] use Term::ReadLine->new() only once
       [not found] <20250902182031.1080266-1-bugzilla.proxmox.com@lookshe.org>
  2025-09-02 18:20 ` [pve-devel] [PATCH manager 1/1] use Term::ReadLine->new() only once Sebastian Luksch via pve-devel
@ 2025-09-02 18:20 ` Sebastian Luksch via pve-devel
  1 sibling, 0 replies; 2+ messages in thread
From: Sebastian Luksch via pve-devel @ 2025-09-02 18:20 UTC (permalink / raw)
  To: pve-devel; +Cc: Sebastian Luksch

[-- Attachment #1: Type: message/rfc822, Size: 6100 bytes --]

From: Sebastian Luksch <bugzilla.proxmox.com@lookshe.org>
To: pve-devel@lists.proxmox.com
Cc: Sebastian Luksch <bugzilla.proxmox.com@lookshe.org>
Subject: [PATCH pmg-api 1/1] use Term::ReadLine->new() only once
Date: Tue,  2 Sep 2025 20:20:31 +0200
Message-ID: <20250902182031.1080266-3-bugzilla.proxmox.com@lookshe.org>

---
 src/PMG/CLI/pmgconfig.pm | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/PMG/CLI/pmgconfig.pm b/src/PMG/CLI/pmgconfig.pm
index 9f3c679..097a599 100644
--- a/src/PMG/CLI/pmgconfig.pm
+++ b/src/PMG/CLI/pmgconfig.pm
@@ -266,6 +266,7 @@ __PACKAGE__->register_method({
         my ($param) = @_;
 
         my $custom_directory = 1;
+        my $term = Term::ReadLine->new('pmgconfig');
         if (!$param->{directory}) {
             my $directories = PMG::API2::ACME->get_directories({});
             print "Directory endpoints:\n";
@@ -277,7 +278,6 @@ __PACKAGE__->register_method({
             }
             print $i, ") Custom\n";
 
-            my $term = Term::ReadLine->new('pmgconfig');
             my $get_dir_selection = sub {
                 my $selection = $term->readline("Enter selection: ");
                 if ($selection =~ /^(\d+)$/) {
@@ -307,7 +307,6 @@ __PACKAGE__->register_method({
         if ($meta->{termsOfService}) {
             my $tos = $meta->{termsOfService};
             print "Terms of Service: $tos\n";
-            my $term = Term::ReadLine->new('pmgconfig');
             my $agreed = $term->readline('Do you agree to the above terms? [y|N]: ');
             die "Cannot continue without agreeing to ToS, aborting.\n"
                 if ($agreed !~ /^y$/i);
@@ -319,7 +318,6 @@ __PACKAGE__->register_method({
 
         my $eab_enabled = $meta->{externalAccountRequired};
         if (!$eab_enabled && $custom_directory) {
-            my $term = Term::ReadLine->new('pmgconfig');
             my $agreed =
                 $term->readline('Do you want to use external account binding? [y|N]: ');
             $eab_enabled = ($agreed =~ /^y$/i);
@@ -328,7 +326,6 @@ __PACKAGE__->register_method({
         }
         if ($eab_enabled) {
             print "You should have received a key id and a key from your CA.\n";
-            my $term = Term::ReadLine->new('pmgconfig');
             my $eab_kid = $term->readline('Enter EAB key id: ');
             my $eab_hmac_key = $term->readline('Enter EAB key: ');
 
-- 
2.30.2



[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-09-03 16:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20250902182031.1080266-1-bugzilla.proxmox.com@lookshe.org>
2025-09-02 18:20 ` [pve-devel] [PATCH manager 1/1] use Term::ReadLine->new() only once Sebastian Luksch via pve-devel
2025-09-02 18:20 ` [pve-devel] [PATCH pmg-api " Sebastian Luksch via pve-devel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal