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] fix #3275: remove old FW config when restoring
Date: Thu, 28 Jan 2021 09:25:59 +0100	[thread overview]
Message-ID: <20210128082559.3470416-1-f.gruenbichler@proxmox.com> (raw)

otherwise proxmox-backup-client will error and the whole restore will
fail.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
 src/PVE/LXC/Create.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/PVE/LXC/Create.pm b/src/PVE/LXC/Create.pm
index 0b38d7d..82d7ad9 100644
--- a/src/PVE/LXC/Create.pm
+++ b/src/PVE/LXC/Create.pm
@@ -294,6 +294,7 @@ sub restore_configuration_from_proxmox_backup {
 		if -e $pct_fwcfg_target;
 	} else {
 	    mkdir $pve_firewall_dir; # make sure the directory exists
+	    unlink $pct_fwcfg_target;
 
 	    my $cmd = "restore";
 	    my $param = [$name, "fw.conf", $pct_fwcfg_target];
-- 
2.20.1





             reply	other threads:[~2021-01-28  8:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-28  8:25 Fabian Grünbichler [this message]
2021-01-28  9: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=20210128082559.3470416-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