echo " === /etc save/restore test ==="
echo " "
echo " "
+UID=`/usr/bin/id -u`
if [ $UID != 0 ] ; then
echo " "
echo "You must be root to run this test."
scripts/copy-test-confs
echo "/etc" >/tmp/file-list
rm -rf /tmp/TestVolume001 /tmp/bacula-restores
-bin/bacula stop
+bin/bacula stop 2>&1 >/dev/null
bin/drop_sqlite_tables
bin/make_sqlite_tables
-bin/bacula start
+bin/bacula start 2>&1 >/dev/null
bin/console -c bin/console.conf <<END_OF_DATA
@output /dev/null
messages
@output
quit
END_OF_DATA
-bin/bacula stop
+bin/bacula stop 2>&1 >/dev/null
cd /
${cwd}/bin/testls -e ${cwd}/scripts/exclude-etc-test etc >${cwd}/tmp/original
cd /tmp/bacula-restores
${cwd}/bin/testls -e ${cwd}/scripts/exclude-etc-test etc >${cwd}/tmp/restored
-diff ${cwd}/tmp/original ${cwd}/tmp/restored
+diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 >/dev/null
if [ $? != 0 ] ; then
echo " "
echo " "
else
echo " ===== Test4 /etc OK ===== "
echo " ===== Test4 OK ===== " >>test.out
- rm -rf /tmp/bacula-restores ${cwd}/tmp/original ${cwd}/tmp/restored
- rm -rf /tmp/file-list /tmp/job /tmp/TestVolume001
+ cd ${cwd}
+ scripts/cleanup
fi