public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Bernhard Bitsch <bbitsch@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH] backup.pl: fix Bug12817 - directories missing in backup after include file changed to relat>
Date: Fri, 25 Mar 2022 14:26:44 +0100	[thread overview]
Message-ID: <2e01e8a7-5b8f-8361-722b-d59bdb881d2a@ipfire.org> (raw)
In-Reply-To: <20220325122247.7036-1-adolf.belka@ipfire.org>

[-- Attachment #1: Type: text/plain, Size: 1870 bytes --]

Reviewed-by: Bernhard Bitsch <bbitsch(a)ipfire.org>
Tested-by: Bernhard Bitsch <bbitsch(a)ipfire.org>
Acked-by: Bernhard Bitsch <bbitsch(a)ipfire.org>

Am 25.03.2022 um 13:22 schrieb Adolf Belka:
> From: Bernhard Bitsch <bbitsch(a)ipfire.org>
> 
> - The change of the backup include file from absolute paths to relative paths in CU164
>     commit https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=c7e0d73e7cfd7be95db9d0a5f3392b8241813d5b
>     resulted in 20 core function directories no longer being backed up. Additionally a
>     similar effect occurred with some addon backups
> - Fix applied here proposed by Bernhard Bitsch and tested on a vm testbed system and
>     confirmed to fix the problem. Backup of all directories again being done.
> 
> Fixes: Bug12817
> Tested-By: Adolf Belka <adolf.belka(a)ipfire.org>
> Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
> ---
>   config/backup/backup.pl | 22 ++++++++++++----------
>   1 file changed, 12 insertions(+), 10 deletions(-)
> 
> diff --git a/config/backup/backup.pl b/config/backup/backup.pl
> index a2337cf23..c7dbc6cae 100644
> --- a/config/backup/backup.pl
> +++ b/config/backup/backup.pl
> @@ -35,16 +35,18 @@ list_addons() {
>   process_includes() {
>   	local include
>   
> -	for include in $@; do
> -		local file
> -		while read -r file; do
> -			for file in ${file}; do
> -				if [ -e "/${file}" ]; then
> -					echo "${file}"
> -				fi
> -			done
> -		done < "${include}"
> -	done | sort -u
> +    pushd / >/dev/null
> +     	for include in $@; do
> +	    	local file
> +	    	while read -r file; do
> +	    		for file in ${file}; do
> +	    			if [ -e "/${file}" ]; then
> +	    				echo "${file}"
> +	    			fi
> +	    		done
> +	    	done < "${include}"
> +	    done | sort -u
> +    popd >/dev/null
>   }
>   
>   make_backup() {

  reply	other threads:[~2022-03-25 13:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-25 12:22 Adolf Belka
2022-03-25 13:26 ` Bernhard Bitsch [this message]
2022-03-28 14:08 ` Michael Tremer
2022-03-28 14:30   ` Adolf Belka
2022-03-28 16:24     ` Adolf Belka
2022-03-28 16:40       ` Michael Tremer
2022-03-28 18:22         ` Adolf Belka
2022-03-28 19:26           ` Bernhard Bitsch
2022-03-29 10:23             ` Michael Tremer

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=2e01e8a7-5b8f-8361-722b-d59bdb881d2a@ipfire.org \
    --to=bbitsch@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