exit 0
fi
-print_debug "Detected ip address is $IP"
-
outf="tmp/sed_tmp"
echo "s/PidDirectory/DirSourceAddress=$IP; PidDirectory/g" > $outf
echo "s/Address =/Address = 127.0.0.1 #/g" >> $outf
FDPORT=$(($BASEPORT + 1))
SDPORT=$(($BASEPORT + 2))
-change_jobname Client1 $JobName
+change_jobname BackupClient1 $JobName
start_test
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@output /dev/null
+@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-@#label volume=TestVolume001 storage=File pool=Default
+@#label volume=TestVolume001 storage=File pool=File
@#setdebug level=100 storage=File
run job=$JobName yes
@sleep 3
run_bacula
-print_debug "Connections to SD sourced from ${IP}:"
+print_debug "Detecting connections to SD sourced from ${IP}"
netstat -tan | grep -E "127.0.0.1(.|:)$SDPORT .* ${IP}" > $tmp/log3.out
if [ $? -ne 0 ]; then
stat=2
print_debug "Couldn't detect a connection to the SD sourced from SourceAddress ${IP}"
fi
-print_debug "Connections to FD sourced from ${IP}:"
+print_debug "and connections to FD sourced from ${IP}"
netstat -tan | grep -E "127.0.0.1(.|:)$FDPORT .* ${IP}" >> $tmp/log3.out
if [ $? -ne 0 ]; then
stat=2
print_debug "Couldn't detect a connection to the FD sourced from SourceAddress ${IP}"
fi
+if [ "$stat" = 2 ] ; then
+ netstat -tan
+fi
+
+if [ "$debug" = 1 ] ; then
+ cat $tmp/log3.out
+fi
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@output /dev/null
+@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label volume=TestVolume001 storage=File pool=Default
+label volume=TestVolume001 storage=File pool=File
@#setdebug level=100 storage=File
wait
messages
yes
wait
messages
-@$out
quit
END_OF_DATA