From patchwork Fri Dec 20 10:04:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 8330 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4YF30v3Txkz3x5g for ; Fri, 20 Dec 2024 10:04:15 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "E6" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4YF30r493kz10t; Fri, 20 Dec 2024 10:04:12 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4YF30r1pjcz3340; Fri, 20 Dec 2024 10:04:12 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4YF30n5NrBz307p for ; Fri, 20 Dec 2024 10:04:09 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4YF30m6FsRzkt; Fri, 20 Dec 2024 10:04:08 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1734689049; 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; bh=3oJ/HyiLI7cIn2ZehJfV9C0peXYvkY2H/Udj5YHMspM=; b=EhWiMcyotpvoMMQ1pg2NQ1NEoewDW9R0QLevdIZxE5jW3t0w8tNacERWFre0OnR5XfjIet SNdXwRAz29FdD2AQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1734689049; 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; bh=3oJ/HyiLI7cIn2ZehJfV9C0peXYvkY2H/Udj5YHMspM=; b=h3zijoLgh7jFvhkNJDC0K2H1RtWVVP8BmytQct/3aP3gN05JMP9yhkAR1hPVEaLRDxiHpz FAvp8GLuDnk0a5idjyaFugIiKwFoYjX4MtnsK8JiVv/3Y0tV5mvfV46JnaHMHWwbLG6okg +77i1mkrTpjqMb5QR5wC1t1XsGW2L5G9+gpv1Zkmlfwxn1aGWxmbMONHqT1malX5I8brcg i2Re+6pTdgBlBnUh6OZxzdA00k1fAAc9wtDJFNEmbp9UHIGCCx14PAr0ingkqttvHpYfmE rX2m/XaBpndr/U9gjNb4yic7HV/OXZ947s0lPBEuCn+TQ65Zvwdfj+4OKRQflw== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH] backup.pl: Fix Bug13799 - addon restore not working Date: Fri, 20 Dec 2024 11:04:05 +0100 Message-ID: <20241220100405.73336-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: J5XORX3ZY2JTLGLR5X7LWI6UHN2MZBQ6 X-Message-ID-Hash: J5XORX3ZY2JTLGLR5X7LWI6UHN2MZBQ6 X-MailFrom: adolf.belka@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: - This fixes the existence check for the addon .ipf file from a check of existence of a directory to a check of existence of a file. Suggested-by: Bernhard Bitsch Tested-by: Bernhard Bitsch Fixes: Bug13799 Signed-off-by: Adolf Belka Reviewed-by: Bernhard Bitsch --- config/backup/backup.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/backup/backup.pl b/config/backup/backup.pl index 3b10b8707..b618576e1 100644 --- a/config/backup/backup.pl +++ b/config/backup/backup.pl @@ -285,7 +285,7 @@ make_addon_backup() { restore_addon_backup() { local name="${1}" - if [ -d "/tmp/${name}.ipf" ]; then + if [ -e "/tmp/${name}.ipf" ]; then mv "/tmp/${name}.ipf" "/var/ipfire/backup/addons/backup/${name}.ipf" fi