--- /dev/null
+#!/bin/sh
+#
+TestName="reload-client-address-test"
+JobName=backup
+. scripts/functions
+
+scripts/cleanup
+scripts/copy-confs
+
+#
+# Zap out any schedule in default conf file so that
+# it doesn't start during our test
+#
+outf="$tmp/sed_tmp"
+echo "s% Schedule =%# Schedule =%g" >${outf}
+cp $scripts/bacula-dir.conf $tmp/1
+sed -f ${outf} $tmp/1 >$scripts/bacula-dir.conf
+
+change_jobname BackupClient1 $JobName
+start_test
+
+$bperl -e 'add_attribute("$conf/bacula-dir.conf", "Address", "127.0.0.1", "Client")'
+
+cat <<END_OF_DATA >$tmp/bconcmds
+@$out /dev/null
+messages
+@$out $tmp/log0.out
+show client
+@$out $tmp/log1.out
+run job=$JobName yes
+wait
+messages
+quit
+END_OF_DATA
+
+run_bacula
+
+print_debug "Changing 127.0.0.1 to 127.0.0.2 for the Client"
+$bperl -e 'add_attribute("$conf/bacula-dir.conf", "Address", "127.0.0.2", "Client")'
+
+cat <<END_OF_DATA >$tmp/bconcmds
+@$out $tmp/log2.out
+reload
+messages
+show client
+quit
+END_OF_DATA
+
+run_bconsole
+
+cat <<END_OF_DATA >$tmp/bconcmds
+@$out $tmp/log3.out
+show client
+quit
+END_OF_DATA
+
+run_bconsole
+
+grep "127.0.0.1" $tmp/log0.out
+if [ $? -ne 0 ]; then
+ print_debug "ERROR: Should find 127.0.0.1 in $tmp/log0.out"
+ estat=1
+fi
+
+grep "127.0.0.2" $tmp/log2.out
+if [ $? -ne 0 ]; then
+ print_debug "ERROR: Should find 127.0.0.2 in $tmp/log2.out"
+ estat=1
+fi
+
+grep "127.0.0.2" $tmp/log3.out
+if [ $? -ne 0 ]; then
+ print_debug "ERROR: Should find 127.0.0.2 in $tmp/log3.out"
+ estat=1
+fi
+
+
+stop_bacula
+
+end_test