Package: backup2l / 1.5-7

08_fix-mask-list.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Package:     backup2l
Subject:     fix problem with MASK_LIST in 'for' loops
Author:      Joachim Wiedorn <ad_debian at joonet.de>
Origin:      upstream, http://sourceforge.net/projects/backup2l/forums/forum/121200/topic/4708938
Forwarded:   no
Last-Update: 2012-04-27

In some cases this invocation does not work as expected:
  backup2l -l /var/log/mail.log /var/log/auth.log /var/log/user.log
The lists of for loops should not be inside quotation mark.
---

diff -urN s07/backup2l s08/backup2l
--- s07/backup2l	2012-04-27 20:45:23.736469131 +0200
+++ s08/backup2l	2012-04-27 20:47:44.556468562 +0200
@@ -823,7 +823,7 @@
         while [[ ${#FBID} -lt 5 ]]; do
             FBID=$FBID" "
         done
-        for X in "$MASK"; do
+        for X in $MASK; do
            gunzip -c $VOLNAME.$BID.obsolete.gz | grep "$X" | sed "s/^/$VOLNAME.$FBID - /"
            gunzip -c $VOLNAME.$BID.new.gz | grep "$X" | sed "s/^/$VOLNAME.$FBID + /"
         done
@@ -862,7 +862,7 @@
     fi
 
     # determine active files...
-    for MASK in "$MASK_LIST"; do
+    for MASK in $MASK_LIST; do
         gunzip -c $VOLNAME.$BID.list.gz | grep "$MASK" | tee $TMP.found | grep '/$' >> $TMP.dirs
             # dirs go to $TMP.dirs WITH attributes
         grep -v '/$' $TMP.found | eval "$FILTER_NAME" >> $TMP.left