]> git.sur5r.net Git - bacula/bacula/blob - regress/scripts/pretest
Make out of freespace non-fatal for removable devices -- i.e. behaves like tape
[bacula/bacula] / regress / scripts / pretest
1 #!/bin/sh
2 #
3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
5 #
6
7 #
8 #  Test if daemons start
9 #
10
11 TestName="pretest"
12 JobName=backup
13 error=0
14
15 . scripts/functions
16
17 copy_test_confs
18
19
20 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
21 messages
22 quit
23 END_OF_DATA
24
25 start_test
26
27 run_bacula
28 if [ $? -ne 0 ]; then
29    echo "Error: Starting Bacula Failed in pretest"
30    make distclean
31    make setup
32    exit 1
33 fi
34
35 bin/bacula-ctl-dir status >/dev/null
36 if [ $? -ne 0 ]; then
37    echo "Error: bacula-dir failed to start"
38    make distclean
39    make setup
40    exit 1
41 fi
42
43 bin/bacula-ctl-fd status >/dev/null
44 if [ $? -ne 0 ]; then
45    echo "Error: bacula-fd failed to start"
46    make distclean
47    make setup
48    exit 1
49 fi
50
51 bin/bacula-ctl-sd status >/dev/null
52 if [ $? -ne 0 ]; then
53    echo "Error: bacula-sd failed to start"
54    make distclean
55    make setup
56    exit 1
57 fi
58
59 stop_bacula
60
61 dstat=0
62 bstat=$error
63 rstat=0
64 export dstat
65 export bstat
66 export rstat
67
68 end_test
69
70 exit $error