]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/scripts/do_sed
fix bad script tests + add smtp_host + fix tape options
[bacula/bacula] / regress / scripts / do_sed
index c4effe98f98220d2d389d6dbeb50356066c07ada..2f5791cf81719dc28ffbd67f5149261c0f84bdd2 100755 (executable)
@@ -1,11 +1,12 @@
 #!/bin/sh
 #
-if test $# != 5 ; then
+if test $# != 6 ; then
    echo "First arg must be email name"
    echo "  and the second must be a tape drive"
    echo "  and the third must be a tape control name or /dev/null"
    echo "  and the fourth must be the full path to the mtx program"
    echo "  and the fifth must be tape drive 1 or /dev/null"
+   echo "  and the sixth must be the smtp or email host"
    exit 1
 fi
 out="/tmp/sed_tmp"
@@ -28,6 +29,7 @@ echo "s%@tmpdir@%${cwd}/tmp%g" >>${out}
 echo "s%@hostname@%${host}%g" >>${out}
 echo "s%@changer_path@%${4}%g" >>${out}
 echo "s%@tape_drive1@%${5}%g" >>${out}
+echo "s%@smtp_host@%${6}%g" >>${out}
 
 # process .in files with sed script
 sed -f ${out} ${cwd}/scripts/test-bacula-dir.conf.in >${cwd}/scripts/test-bacula-dir.conf
@@ -55,11 +57,11 @@ chmod 777 ${cwd}/bin/mtx-changer
 
 # get proper SD tape definitions
 touch ${cwd}/bin/tape_options
-if test x`uname` = xLinux ; then \
-   cp -f ${cwd}/scripts/linux_tape_options ${cwd}/bin/tape_options ; \
+if test x`uname` = xLinux ; then
+   cp -f ${cwd}/scripts/linux_tape_options ${cwd}/bin/tape_options
 fi
-if test x`uname` = xFreeBSD ; then \
-   cp -f ${cwd}/scripts/freebsd_tape_options ${cwd}/bin/tape_options ; \
+if test x`uname` = xFreeBSD ; then
+   cp -f ${cwd}/scripts/freebsd_tape_options ${cwd}/bin/tape_options
 fi
 
 rm -f ${out}