all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH container] restore: fix fw.conf restore for PBS
Date: Mon,  7 Dec 2020 09:18:49 +0100	[thread overview]
Message-ID: <20201207081849.3707472-1-f.gruenbichler@proxmox.com> (raw)

the 'files' command returns a list of hashes, and the filename is
'fw.conf.blob' not 'fw.conf'.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
Tested with container with and without firewall config.

 src/PVE/LXC/Create.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/LXC/Create.pm b/src/PVE/LXC/Create.pm
index 39902a2..5c64566 100644
--- a/src/PVE/LXC/Create.pm
+++ b/src/PVE/LXC/Create.pm
@@ -280,7 +280,7 @@ sub restore_configuration_from_proxmox_backup {
     my $cmd = "files";
 
     my $list = PVE::Storage::PBSPlugin::run_client_cmd($scfg, $storeid, "files", [$name]);
-    my $has_fw_conf = grep { $_ eq 'fw.conf' } @$list;
+    my $has_fw_conf = grep { $_->{filename} eq 'fw.conf.blob' } @$list;
 
     if ($has_fw_conf) {
 	my $pve_firewall_dir = '/etc/pve/firewall';
-- 
2.20.1





             reply	other threads:[~2020-12-07  8:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-07  8:18 Fabian Grünbichler [this message]
2020-12-07  8:29 ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201207081849.3707472-1-f.gruenbichler@proxmox.com \
    --to=f.gruenbichler@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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