diff options
Diffstat (limited to 'scripts/wsrep_sst_common.sh')
-rw-r--r-- | scripts/wsrep_sst_common.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index 44c97fdb5f4..30303de0779 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -1,4 +1,4 @@ -# Copyright (C) 2010 Codership Oy +# Copyright (C) 2012 Codership Oy # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,6 +19,7 @@ set -u WSREP_SST_OPT_BYPASS=0 +WSREP_SST_OPT_DATA="" while [ $# -gt 0 ]; do case "$1" in @@ -86,7 +87,12 @@ shift done readonly WSREP_SST_OPT_BYPASS -SST_PROGRESS_FILE="$WSREP_SST_OPT_DATA/sst_in_progress" +if [ -n "$WSREP_SST_OPT_DATA" ] +then + SST_PROGRESS_FILE="$WSREP_SST_OPT_DATA/sst_in_progress" +else + SST_PROGRESS_FILE="" +fi wsrep_log() { @@ -108,6 +114,6 @@ wsrep_log_info() wsrep_cleanup_progress_file() { - rm -f $SST_PROGRESS_FILE 2>/dev/null + [ -n "$SST_PROGRESS_FILE" ] && rm -f "$SST_PROGRESS_FILE" 2>/dev/null } |