Permalink
Browse files

Don't need to echo datestamp to logfiles twice

  • Loading branch information...
1 parent 04b42e5 commit 47af45807b2d12293467164bd429de19ed06008b @kmoore134 kmoore134 committed Aug 8, 2013
Showing with 7 additions and 7 deletions.
  1. +7 −7 src-sh/lpreserver/backend/functions.sh
@@ -241,14 +241,14 @@ check_rep_task() {
# Is this a sync-task we do at the time of a snapshot?
if [ "$2" = "sync" -a "$TIME" = "sync" ] ; then
export DIDREP=1
- echo_log "`date`: Starting replication SYNC task on ${DATASET}"
+ echo_log "Starting replication SYNC task on ${DATASET}"
queue_msg "`date`: Starting replication SYNC task on ${DATASET}\n"
start_rep_task "$LDATA"
return $?
else
# Ready to do a scheduled replication
export DIDREP=1
- echo_log "`date`: Starting replication SCHEDULED task on ${DATASET}"
+ echo_log "Starting replication SCHEDULED task on ${DATASET}"
queue_msg "`date`: Starting replication SCHEDULED task on ${DATASET}\n"
start_rep_task "$LDATA"
return $?
@@ -292,7 +292,7 @@ start_rep_task() {
# Lets mark our new latest snapshot and unmark the last one
zfs set backup:lpreserver=' ' ${LDATA}@$lastSEND
zfs set backup:lpreserver=LATEST ${LDATA}@$lastSNAP
- echo_log "`date`: Finished replication task on ${DATASET}"
+ echo_log "Finished replication task on ${DATASET}"
save_rep_props
zStatus=$?
else
@@ -304,7 +304,7 @@ start_rep_task() {
cat ${CMDLOG} >> ${FLOG}
echo "\nRecv log:\n" >> ${FLOG}
cat ${CMDLOG2} >> ${FLOG}
- echo_log "`date`: FAILED replication task on ${DATASET}: LOGFILE: $FLOG"
+ echo_log "FAILED replication task on ${DATASET}: LOGFILE: $FLOG"
fi
return $zStatus
@@ -315,7 +315,7 @@ save_rep_props() {
if [ "$RECURMODE" != "ON" ] ; then return 0; fi
if [ "`basename $DATASET`" != "$DATASET" ] ; then return 0; fi
- echo_log "`date`: Saving dataset properties for: ${DATASET}"
+ echo_log "Saving dataset properties for: ${DATASET}"
queue_msg "`date`: Saving dataset properties for: ${DATASET}\n"
# Lets start by building a list of props to keep
@@ -324,11 +324,11 @@ save_rep_props() {
zfs get -r all $DATASET | grep ' local$' | awk '{$1=$1}1' OFS=" " | sed 's| local$||g' \
| ssh -p ${REPPORT} ${REPUSER}@${REPHOST} "cat > $rProp"
if [ $? -eq 0 ] ; then
- echo_log "`date`: Successful save of dataset properties for: ${DATASET}"
+ echo_log "Successful save of dataset properties for: ${DATASET}"
queue_msg "`date`: Successful save of dataset properties for: ${DATASET}\n"
return 0
else
- echo_log "`date`: Failed saving dataset properties for: ${DATASET}"
+ echo_log "Failed saving dataset properties for: ${DATASET}"
queue_msg "`date`: Failed saving dataset properties for: ${DATASET}\n"
return 1
fi

0 comments on commit 47af458

Please sign in to comment.