wsrep_sst_rsync.sh remove some external comands

Bug #1286414 reported by Daniel Black
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
New
Undecided
Unassigned

Bug Description

$(cat $pid_file) === $(< $pid_file)
$(dirname $a) === ${a%/*}
$(basename $a) === ${a##*/}

cleanup_joiner() {
 wsrep_log_info "Joiner cleanup."
 [ -r "$RSYNC_PID" ] && localpid=$(< "$RSYNC_PID") && kill $PID && sleep 0.5 && kill -9 $PID >/dev/null 2>&1 || :
     rm -rf "$RSYNC_CONF" "$MAGIC_FILE" "$RSYNC_PID"
    wsrep_log_info "Joiner cleanup done."
    if [ "${WSREP_SST_OPT_ROLE}" = "joiner" ];then
        wsrep_cleanup_progress_file
    fi
}

check_pid - remove

TODO bsd/osx check

check_pid_and_port()
{
    local rsync_port=$2

    [ -r $1 ] && lsof -p $(< $1) -n -a -i :$rsync_port -a -c rsync
}

    BINLOG_DIRNAME=${WSREP_SST_OPT_BINLOG%/*}
    BINLOG_FILENAME=${$WSREP_SST_OPT_BINLOG##*/}

RSYNC_PORT=${WSREP_SST_OPT_ADDR#*:}
if [ -z "$RSYNC_PORT" ]
    then
        RSYNC_PORT=4444
        RSYNC_ADDR=${WSREP_SST_OPT_ADDR%:*}
        ADDR=$RSYNC_ADDR:$RSYNC_PORT
fi

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.