From patchwork Tue Mar 29 12:27:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 5413 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 (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4KSTN62lSWz3wf7 for ; Tue, 29 Mar 2022 12:27:18 +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 ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4KSTN51JQpz3Yd; Tue, 29 Mar 2022 12:27:17 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4KSTN471lmz2yK8; Tue, 29 Mar 2022 12:27:16 +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 (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4KSTN43F0qz2xPD for ; Tue, 29 Mar 2022 12:27:16 +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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4KSTN40Fb9z2ll; Tue, 29 Mar 2022 12:27:15 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1648556836; 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=oH2O54p//qplcBM7RPxkR8RMG/VsXmxHgmy1FkkxuBk=; b=xK0G2GzpmrY5//8HnKDMJfXiOfItj9Drvt25IahuNl6ASRu8Eu4EDzF5wcm1L39DsznrUB gvCF5y0KmtnpYcDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1648556836; 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=oH2O54p//qplcBM7RPxkR8RMG/VsXmxHgmy1FkkxuBk=; b=dZY434hqVMMUFm4xTIY5s5jMwzzADRCs/osQ/GCioIroeQMkVqSV+FgPvosdfMWJvHNrTe qeGpvMqoQ8Qi/LXYbWVYv23y57nC73FF9hRx2RHRC2Lh9K3GdSjiLYeykvKPi+ryu0tPXF ev/qhqOCgNxWd61i5pqxscBw8g7qdrCubrkWK00OuTRwzWHuIgkz8xtwx23oMz9iSry9qz cXehbIxUcEXp1iIdSeG9V+qHA7XNjemr0CecT+fs6+037XUhEs76VgU5d4KGW0++fHjV7k EEXANJKM6NfosxaRWN55nbSDpxrQ+560KDKLdeKAFKGcB5k6eyYXmCpKybdvJQ== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH] backup: Fix broken globbing expansion Date: Tue, 29 Mar 2022 12:27:11 +0000 Message-Id: <20220329122711.558230-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" This patch fixes globbing expansion in the backup include file list which got broken in c7e0d73e7cfd7be95db9d0a5f3392b8241813d5b. Signed-off-by: Michael Tremer --- config/backup/backup.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/backup/backup.pl b/config/backup/backup.pl index a2337cf23..6f9295e94 100644 --- a/config/backup/backup.pl +++ b/config/backup/backup.pl @@ -19,6 +19,8 @@ # # ############################################################################### +shopt -s nullglob + NOW="$(date "+%Y-%m-%d-%H:%M")" list_addons() { @@ -38,10 +40,8 @@ process_includes() { for include in $@; do local file while read -r file; do - for file in ${file}; do - if [ -e "/${file}" ]; then - echo "${file}" - fi + for file in /${file}; do + echo "${file}" done done < "${include}" done | sort -u