From b3ad86f270d4680e9900651d3dc40c4a7f85273c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 2 Feb 2009 11:47:45 +0100 Subject: [PATCH] [BUGFIX] allow "&" in sourcepath MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug description: From: Tiziano Müller Subject: Notiz: Probleme mit Ampersand in source Date: Tue, 07 Oct 2008 16:11:10 +0000 Hoi Nico Kleine Notiz wie im IRC besprochen: - Hat es in /etc/ccollect/sources/$BACKUPNAME/source ein Ampersand muss dieses Escaped werden, da sonst folgender Fehler auftritt: *snip* [volumes_ForschungEntwicklung] 2008-10-05-03:10:03: Beginning to backup, this may take some time... [volumes_ForschungEntwicklung] 2008-10-05-03:10:03: Creating /home/backup/volumes/Forschung&Entwicklung/daily.20081005-0310.15173 ... [volumes_ForschungEntwicklung] 2008-10-05-03:10:03: Transferring files... [volumes_ForschungEntwicklung] bash: Entwicklung/*: No such file or directory [volumes_ForschungEntwicklung] rsync: connection unexpectedly closed (4 bytes received so far) [receiver] [volumes_ForschungEntwicklung] rsync error: error in rsync protocol data stream (code 12) at io.c(635) [receiver=3.0.2] [volumes_ForschungEntwicklung] 2008-10-05-03:10:03: Finished backup (rsync return code: 12). [volumes_ForschungEntwicklung] 2008-10-05-03:10:03: Warning: rsync exited non-zero, the backup may be broken (see rsync errors). *snip* - ein "&" im Namen fürs Backup, also: /etc/ccollect/sources/volumes_Forschung&Entwicklung/ wird beim Anzeigen (wie oben zu sehen) verschluckt. Cheers, Tiziano Signed-off-by: Nico Schottelius --- ccollect.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ccollect.sh b/ccollect.sh index f3c3e91..837a895 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# 2005-2008 Nico Schottelius (nico-ccollect at schottelius.org) +# 2005-2009 Nico Schottelius (nico-ccollect at schottelius.org) # # This file is part of ccollect. # @@ -38,7 +38,7 @@ CPOSTEXEC="${CDEFAULTS}/post_exec" TMP=$(mktemp "/tmp/${__myname}.XXXXXX") VERSION=0.7.1 -RELEASE="2008-04-XX" +RELEASE="2009-XX-XX" HALF_VERSION="ccollect ${VERSION}" FULL_VERSION="ccollect ${VERSION} (${RELEASE})" @@ -79,7 +79,7 @@ _exit_err() add_name() { - sed "s:^:\[${name}\] :" + awk "{ print \"[${name}] \" \$0 }" } pcmd()