aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2014-02-22 10:18:08 +0000
committerintrigeri <intrigeri@boum.org>2014-02-22 10:20:40 +0000
commit5b05d8ff402ba94142e8e93bcac3091c2103159c (patch)
tree6958d839d0104e07d8b4d1e516616f7735bc9aa3
parent29e2c75ede42b329d38dbf843ac35afb9148305c (diff)
downloadbackupninja-5b05d8ff402ba94142e8e93bcac3091c2103159c.tar.gz
backupninja-5b05d8ff402ba94142e8e93bcac3091c2103159c.tar.bz2
Fix indentation (thanks to exobuzz for the patch, closes: Redmine#6726).
-rwxr-xr-xsrc/backupninja.in54
1 files changed, 27 insertions, 27 deletions
diff --git a/src/backupninja.in b/src/backupninja.in
index 3b546b4..0901742 100755
--- a/src/backupninja.in
+++ b/src/backupninja.in
@@ -326,32 +326,32 @@ function process_action() {
# start locked section : avoid concurrent execution of the same backup
# uses a construct specific to shell scripts with flock. See man flock for details
{
- debug "executing handler in locked section controlled by $lockfile"
- flock -x -w 5 200
- # if all is good, we acquired the lock
- if [ $? -eq 0 ]; then
-
- let "actions_run += 1"
-
- # call the handler:
- echo_debug_msg=1
- (
- . $scriptdirectory/$suffix $file
- ) 2>&1 | (
- while read a; do
- echo $a >> $bufferfile
- [ $debug ] && colorize "$a"
- done
- )
- retcode=$?
- # ^^^^^^^^ we have a problem! we can't grab the return code "$?". grrr.
- echo_debug_msg=0
-
- else
- # a backup is probably ongoing already, so display an error message
- debug "failed to acquire lock $lockfile"
- echo "Fatal: Could not acquire lock $lockfile. A backup is probably already running for $file." >>$bufferfile
- fi
+ debug "executing handler in locked section controlled by $lockfile"
+ flock -x -w 5 200
+ # if all is good, we acquired the lock
+ if [ $? -eq 0 ]; then
+
+ let "actions_run += 1"
+
+ # call the handler:
+ echo_debug_msg=1
+ (
+ . $scriptdirectory/$suffix $file
+ ) 2>&1 | (
+ while read a; do
+ echo $a >> $bufferfile
+ [ $debug ] && colorize "$a"
+ done
+ )
+ retcode=$?
+ # ^^^^^^^^ we have a problem! we can't grab the return code "$?". grrr.
+ echo_debug_msg=0
+
+ else
+ # a backup is probably ongoing already, so display an error message
+ debug "failed to acquire lock $lockfile"
+ echo "Fatal: Could not acquire lock $lockfile. A backup is probably already running for $file." >>$bufferfile
+ fi
} 200> $lockfile
# end of locked section
@@ -592,7 +592,7 @@ if [ $doit == 1 ]; then
{
for ((i=0; i < ${#messages[@]} ; i++)); do
- echo ${messages[$i]}
+ echo ${messages[$i]}
done
echo -e "$errormsg"
if [ "$reportspace" == "yes" ]; then