From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH] backup: Fix broken globbing expansion
Date: Tue, 29 Mar 2022 14:11:16 +0100 [thread overview]
Message-ID: <11ECA6D8-AB58-4546-9F7C-50E19197C4E2@ipfire.org> (raw)
In-Reply-To: <1e9b7f29-a3ef-92f1-7644-41c2c71ab1c9@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 1798 bytes --]
Hello,
Could you please send the file listing to find out what is being included what shouldn’t?
-Michael
> On 29 Mar 2022, at 14:10, Adolf Belka <adolf.belka(a)ipfire.org> wrote:
>
> Hi Michael,
>
> Just tried this patch out on my vm testbed system and it still doesn't work for me. The backup file had got to 1.3GB when I deleted the backup file as it was still growing. The normal correct backup file on that vm machine is around 7MB
>
> The above was the case for both running it from the WUI or from the command line from my unprivileged user using sudo backupctrl exclude
>
> Regards,
>
> Adolf.
>
>
> On 29/03/2022 14:27, Michael Tremer wrote:
>> This patch fixes globbing expansion in the backup include file list
>> which got broken in c7e0d73e7cfd7be95db9d0a5f3392b8241813d5b.
>>
>> Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
>> ---
>> 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
next prev parent reply other threads:[~2022-03-29 13:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-29 12:27 Michael Tremer
2022-03-29 13:10 ` Adolf Belka
2022-03-29 13:11 ` Michael Tremer [this message]
2022-03-29 13:36 ` Bernhard Bitsch
2022-03-29 13:49 ` Michael Tremer
2022-03-29 14:01 ` Adolf Belka
2022-03-29 14:03 ` Michael Tremer
2022-03-29 14:17 ` Adolf Belka
2022-03-29 14:14 ` Adolf Belka
2022-03-29 14:22 ` Bernhard Bitsch
2022-03-29 14:22 ` Michael Tremer
2022-03-29 15:23 ` Adolf Belka
2022-03-29 18:36 ` Bernhard Bitsch
2022-03-29 19:21 ` Bernhard Bitsch
2022-03-30 14:06 ` Michael Tremer
2022-03-30 14:38 ` Bernhard Bitsch
2022-03-30 15:05 ` Michael Tremer
2022-03-30 21:20 ` Adolf Belka
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=11ECA6D8-AB58-4546-9F7C-50E19197C4E2@ipfire.org \
--to=michael.tremer@ipfire.org \
--cc=development@lists.ipfire.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox