]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/usr-tape-root
Backport from Bacula Enterprise
[bacula/bacula] / regress / tests / usr-tape-root
index 64d9040c35bb6696093a3397e9ff386d02025602..95e764e02b7b2aea574544900e0242f83c88e167 100755 (executable)
@@ -1,4 +1,9 @@
 #!/bin/sh
+#
+# Copyright (C) 2000-2015 Kern Sibbald
+# License: BSD 2-Clause; see file LICENSE-FOSS
+#
+
 #
 # Run a simple backup of the /usr directory
 #   then restore it.
@@ -7,7 +12,7 @@ cwd=`pwd`
 . scripts/functions
 scripts/copy-tape-confs
 scripts/cleanup-tape
-echo "/usr" >/tmp/file-list
+echo "/usr" >${cwd}/tmp/file-list
 
 echo " "
 echo " "
@@ -15,19 +20,18 @@ echo " === Starting usr-tape-root test ==="
 echo " "
 echo " "
 
-bin/bacula start 2>&1 >/dev/null
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
-@output /dev/null
+cat <<END_OF_DATA > ${cwd}/tmp/bconcmds
+@$out /dev/null
 messages
-@output tmp/log1.out
-label storage=DDS-4 Volume=TestVolume001 slot=0
+@$out tmp/log1.out
+label storage=tape Volume=TestVolume001 slot=0
 run job=NightlySave yes
 wait
 messages
 @# 
 @# now do a restore
 @#
-@output tmp/log2.out
+@$out tmp/log2.out
 restore where=${cwd}/tmp/bacula-restores select all done
 yes
 wait
@@ -35,7 +39,8 @@ messages
 @output
 quit
 END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
+run_bacula
+stop_bacula
 cd /
 ${cwd}/bin/testls -e ${cwd}/scripts/exclude-usr-test lib >${cwd}/tmp/original
 cd ${cwd}/tmp/bacula-restores