]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/etc-test-root
FreeBSD fixes; manual updates
[bacula/bacula] / regress / tests / etc-test-root
index 24ce9cff9ae7affe951467a666f14f5a2e46d60a..6459026b1224fa3372ef88b624a22e3174af28db 100755 (executable)
@@ -8,6 +8,7 @@ echo " "
 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."
@@ -20,10 +21,10 @@ cwd=`pwd`
 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
@@ -46,12 +47,12 @@ 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 " "
@@ -61,6 +62,6 @@ if [ $? != 0 ] ; then
 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