From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 340141FF17C for ; Wed, 3 Sep 2025 18:07:41 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D078D126C8; Wed, 3 Sep 2025 18:07:44 +0200 (CEST) To: pve-devel@lists.proxmox.com Date: Tue, 2 Sep 2025 20:20:31 +0200 In-Reply-To: <20250902182031.1080266-1-bugzilla.proxmox.com@lookshe.org> References: <20250902182031.1080266-1-bugzilla.proxmox.com@lookshe.org> X-Mailman-Approved-At: Wed, 03 Sep 2025 18:07:41 +0200 MIME-Version: 1.0 Message-ID: List-Id: Proxmox VE development discussion List-Post: From: Sebastian Luksch via pve-devel Precedence: list Cc: Sebastian Luksch X-Mailman-Version: 2.1.29 X-BeenThere: pve-devel@lists.proxmox.com List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: Proxmox VE development discussion List-Help: Subject: [pve-devel] [PATCH pmg-api 1/1] use Term::ReadLine->new() only once Content-Type: multipart/mixed; boundary="===============1870299232510163393==" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" --===============1870299232510163393== Content-Type: message/rfc822 Content-Disposition: inline Return-Path: X-Original-To: pve-devel@lists.proxmox.com Delivered-To: pve-devel@lists.proxmox.com Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 07BD7D2A57 for ; Tue, 2 Sep 2025 20:22:31 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id DE36F1A3E2 for ; Tue, 2 Sep 2025 20:22:00 +0200 (CEST) Received: from ispc.huaraka.de (ispc.huaraka.de [IPv6:2a01:4f8:231:96::1:102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Tue, 2 Sep 2025 20:22:00 +0200 (CEST) Received: from ispc.huaraka.de (localhost [127.0.0.1]) by ispc.huaraka.de (Postfix) with ESMTP id D943B1988AD7 for ; Tue, 2 Sep 2025 20:21:03 +0200 (CEST) Received: from localhost.localdomain (unknown [10.0.0.107]) by ispc.huaraka.de (Postfix) with ESMTP id AAB1A1988ADA; Tue, 2 Sep 2025 20:20:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lookshe.org; s=default; t=1756837233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Sbl062HDU7m7u1McRsC5oae/JeFdhSl4hGqz2ZgueW8=; b=Rbm2+0c5T/JIBYb+7CZzgEwtRFsUaTocsO6C4+N4Kn0CprLNtGmWFZ+5faCycitvN8HPjv rL6YnQTER4hMhUWQC8a/i5U9wxGQGQn7yd+1veE+CWdrCVSH/pfHkkYUuOjdvJpO5rjs5x fRUHAwnP0ehF99a+BGE6fTopMiLE2Iu/O++mxnqCM+tYtB2drRr6V8Xb/NgisTj4BKv1rQ eJPsR0JZW2sc/nucGNtrJpQ3teV5faENFigc87mjjJ1qZfUPWvibqcGBAmswRH6j2J8Oda k6bIOeHRER7kThnEXN3Iku9SeqDCbJS7JI7znHfGjUuuIRbmPFnAknxuAwCJqQ== Authentication-Results: ispc.huaraka.de; none From: Sebastian Luksch To: pve-devel@lists.proxmox.com Cc: Sebastian Luksch 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> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20250902182031.1080266-1-bugzilla.proxmox.com@lookshe.org> References: <20250902182031.1080266-1-bugzilla.proxmox.com@lookshe.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-0.10 / 100.00]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; DKIM_SIGNED(0.00)[lookshe.org:s=default]; FUZZY_RATELIMITED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; IP_WHITELIST(0.00)[ip=10.0.0.107]; FROM_HAS_DN(0.00)[] X-Rspamd-Action: no action X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: IP_WHITELIST X-Rspamd-Server: ispc X-Rspamd-Queue-Id: AAB1A1988ADA X-Spam-Status: No, score=-0.10 X-Spamd-Bar: / X-SPAM-LEVEL: Spam detection results: 0 AWL 0.625 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_PASS -0.1 DMARC pass policy SPF_HELO_PASS -0.001 SPF: HELO matches SPF record SPF_PASS -0.001 SPF: sender matches SPF record X-Mailman-Approved-At: Wed, 03 Sep 2025 18:07:41 +0200 --- 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 --===============1870299232510163393== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel --===============1870299232510163393==--