#!/bin/sh # # Run a simple backup of the /lib directory # then restore it. # cwd=`pwd` bin/bacula stop 2>&1 >/dev/null bin/drop_sqlite_tables bin/make_sqlite_tables scripts/copy-tape-confs scripts/cleanup-tape echo "/lib" >/tmp/file-list echo " " echo " " echo " === Starting lib-tape-root test ===" echo " " echo " " bin/bacula start 2>&1 >/dev/null bin/bconsole -c bin/bconsole.conf <&1 >/dev/null cd / ${cwd}/bin/testls -e ${cwd}/scripts/exclude-usr-test lib >${cwd}/tmp/original cd ${cwd}/tmp/bacula-restores ${cwd}/bin/testls -e ${cwd}/scripts/exclude-usr-test lib >${cwd}/tmp/restored cd ${cwd}/tmp sed s%.*lib/kbd/consolefonts$%lib/kbd/consolefonts% original >1 sort <1 >original # sed s%.*lib/kbd/consolefonts$%lib/kbd/consolefonts% restored >1 sort <1 >restored rm -f 1 # cd ${cwd} diff tmp/original tmp/restored 2>&1 1>/dev/nul if [ $? != 0 ] ; then echo " " echo " " echo " ===== lib-tape-root failed!!! ===== " echo " ===== lib-tape-root failed!!! ===== " >>test.out echo " " else echo " ===== lib-tape-root OK ===== " echo " ===== lib-tape-root OK ===== " >>test.out scripts/cleanup fi