# With DNS errors, it will take more times
(run_bconsole $tmp/bconcmds.err)&
-sleep 2
+sleep 10
cat <<EOF > $tmp/bconcmds.sametime
@out /dev/null
run_bconsole $tmp/bconcmds.sametime
wait
+sleep 10
$bperl -e '(-M "$tmp/logsametime.done" < -M "$tmp/logerr.done") && exit 1'
if [ $? -ne 0 ]; then
print_debug "ERROR: The timestamp of $tmp/logsametime.done should be smaller than $tmp/logerr.done"
+ echo "logsametime.done"
+ cat $tmp/logsametime.done
+ echo "logerr.done"
+ cat $tmp/logerr.done
estat=1
fi
# Remove last / and convert all / to cd commands
CD=`echo $tmp | sed 's:/$::' | sed 's:/:\ncd :g'`
+echo "CD=${CD}"
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
[ "$debug" = 1 ] && echo MAXRUNTIME ok
else
echo "MAXRUNTIME in error"
+ echo "${cwd}/tmp/RUN_MAXTIME.log"
+ cat ${cwd}/tmp/RUN_MAXTIME.log
bstat=1
fi
-grep 'Termination: *Backup OK' ${cwd}/tmp/RUN_MAXTIME.log >/dev/null
+grep -e 'Termination: *Backup OK' ${cwd}/tmp/RUN_MAXTIME.log >/dev/null
if [ $? -eq 0 ]
then
[ "$debug" = 1 ] && echo MAXRUNTIME2 ok