From: Kern Sibbald Date: Fri, 30 May 2003 10:21:02 +0000 (+0000) Subject: Make machine name independent + move log to working X-Git-Tag: Release-1.31~101 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bc9bcb7ab6bf9f2f343a920dced350713a0cf4aa;p=bacula%2Fbacula Make machine name independent + move log to working git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@555 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/regress/scripts/do_sed b/regress/scripts/do_sed index e0615539e4..49cf3b4110 100755 --- a/regress/scripts/do_sed +++ b/regress/scripts/do_sed @@ -1,6 +1,15 @@ #!/bin/sh +# +if test $# != 1 ; then + echo "First arg must be email name" + exit 1 +fi out="/tmp/sed_tmp" cwd=`pwd` +host=`hostname | tr '.' ' ' | cut -f 1 -d ' '` +if test x$host = x ; then + host=localhost +fi # Create sed command script echo "s%@sbindir@%${cwd}/bin%g" >${out} echo "s%@scriptdir@%${cwd}/bin%g" >>${out} @@ -9,6 +18,7 @@ echo "s%@piddir@%${cwd}/working%g" >>${out} echo "s%@subsysdir@%${cwd}/working%g" >>${out} echo "s%@job_email@%${1}%g" >>${out} echo "s%@tmpdir@%${cwd}/tmp%g" >>${out} +echo "s%@hostname@%${host}%g" >>${out} # process .in files with sed script sed -f ${out} ${cwd}/scripts/test-bacula-dir.conf.in >${cwd}/scripts/test-bacula-dir.conf diff --git a/regress/scripts/regress-config b/regress/scripts/regress-config index 0241deb532..e03e84bc27 100755 --- a/regress/scripts/regress-config +++ b/regress/scripts/regress-config @@ -10,6 +10,7 @@ CFLAGS="-g -O2 -Wall" \ --with-pid-dir=$1/working \ --with-subsys-dir=$1/working \ --enable-smartalloc \ + --disable-readline \ --with-sqlite=$2 \ --with-working-dir=$1/working \ --with-dump-email=$3 \ diff --git a/regress/scripts/test-bacula-dir.conf.in b/regress/scripts/test-bacula-dir.conf.in index 1e83005da8..94bd6f1b36 100644 --- a/regress/scripts/test-bacula-dir.conf.in +++ b/regress/scripts/test-bacula-dir.conf.in @@ -13,7 +13,7 @@ # Director { # define myself - Name = rufus-dir + Name = @hostname@-dir DIRport = 8101 # where we listen for UA connections QueryFile = "@scriptdir@/query.sql" WorkingDirectory = "@working_dir@" @@ -30,7 +30,7 @@ Director { # define myself Job { Name = "NightlySave" Type = Backup - Client=rufus-fd + Client=@hostname@-fd FileSet="Full Set" Storage = File Messages = Standard @@ -41,7 +41,7 @@ Job { Job { Name = "MonsterSave" Type = Backup - Client=rufus-fd + Client=@hostname@-fd FileSet="Full Set" Storage = File1 Messages = Standard @@ -54,7 +54,7 @@ Job { Name = "VerifyVolume" Type = Verify Level = VolumeToCatalog - Client=rufus-fd + Client=@hostname@-fd FileSet="Full Set" Storage = File Messages = Standard @@ -66,7 +66,7 @@ Job { Job { Name = "SparseTest" Type = Backup - Client=rufus-fd + Client=@hostname@-fd FileSet="SparseSet" Storage = File Messages = Standard @@ -77,7 +77,7 @@ Job { Job { Name = "CompressedTest" Type = Backup - Client=rufus-fd + Client=@hostname@-fd FileSet="CompressedSet" Storage = File Messages = Standard @@ -88,7 +88,7 @@ Job { Job { Name = "SparseCompressedTest" Type = Backup - Client=rufus-fd + Client=@hostname@-fd FileSet="SparseCompressedSet" Storage = File Messages = Standard @@ -101,7 +101,7 @@ Job { Job { Name = "BackupCatalog" Type = Backup - Client=rufus-fd + Client=@hostname@-fd FileSet="Catalog" # Schedule = "WeeklyCycleAfterBackup" Storage = File @@ -118,7 +118,7 @@ Job { Job { Name = "RestoreFiles" Type = Restore - Client=rufus-fd + Client=@hostname@-fd FileSet="Full Set" Storage = File Messages = Standard @@ -185,8 +185,8 @@ FileSet { # Client (File Services) to backup Client { - Name = rufus-fd - Address = rufus + Name = @hostname@-fd + Address = @hostname@ FDPort = 8102 Catalog = MyCatalog Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon @@ -198,7 +198,7 @@ Client { # Definiton of file storage device Storage { Name = File - Address = rufus # N.B. Use a fully qualified name here + Address = @hostname@ # N.B. Use a fully qualified name here SDPort = 8103 Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" Device = FileStorage @@ -207,7 +207,7 @@ Storage { Storage { Name = File1 - Address = rufus # N.B. Use a fully qualified name here + Address = @hostname@ # N.B. Use a fully qualified name here SDPort = 8103 Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" Device = FileStorage1 @@ -218,7 +218,7 @@ Storage { # Definition of DLT tape storage device #Storage { # Name = DLTDrive -# Address = rufus # N.B. Use a fully qualified name here +# Address = @hostname@ # N.B. Use a fully qualified name here # SDPort = 8103 # Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon # Device = "HP DLT 80" # must be same as Device in Storage daemon @@ -228,7 +228,7 @@ Storage { # Definition of DDS tape storage device #Storage { # Name = SDT-10000 -# Address = rufus # N.B. Use a fully qualified name here +# Address = @hostname@ # N.B. Use a fully qualified name here # SDPort = 8103 # Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon # Device = SDT-10000 # must be same as Device in Storage daemon @@ -238,7 +238,7 @@ Storage { # Definition of 8mm tape storage device #Storage { # Name = "8mmDrive" -# Address = rufus # N.B. Use a fully qualified name here +# Address = @hostname@ # N.B. Use a fully qualified name here # SDPort = 8103 # Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # Device = "Exabyte 8mm" diff --git a/regress/scripts/test-bacula-fd.conf.in b/regress/scripts/test-bacula-fd.conf.in index c9c21b6615..c5554bbfac 100644 --- a/regress/scripts/test-bacula-fd.conf.in +++ b/regress/scripts/test-bacula-fd.conf.in @@ -11,7 +11,7 @@ # List Directors who are permitted to contact this File daemon # Director { - Name = rufus-dir + Name = @hostname@-dir Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" } @@ -19,7 +19,7 @@ Director { # "Global" File daemon configuration specifications # FileDaemon { # this is me - Name = rufus-fd + Name = @hostname@-fd FDport = 8102 # where we listen for the director WorkingDirectory = "@working_dir@" Pid Directory = "@piddir@" @@ -29,5 +29,5 @@ FileDaemon { # this is me # Send all messages except skipped files back to Director Messages { Name = Standard - director = rufus-dir = all + director = @hostname@-dir = all } diff --git a/regress/scripts/test-bacula-sd.conf.in b/regress/scripts/test-bacula-sd.conf.in index 8ff990b5ef..d05bbf76ca 100644 --- a/regress/scripts/test-bacula-sd.conf.in +++ b/regress/scripts/test-bacula-sd.conf.in @@ -11,7 +11,7 @@ # Storage { # definition of myself - Name = rufus-sd + Name = @hostname@-sd SDPort = 8103 # Director's port WorkingDirectory = "@working_dir@" Pid Directory = "@piddir@" @@ -22,7 +22,7 @@ Storage { # definition of myself # List Directors who are permitted to contact Storage daemon # Director { - Name = rufus-dir + Name = @hostname@-dir Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" } @@ -102,5 +102,5 @@ Device { # Messages { Name = Standard - director = rufus-dir = all + director = @hostname@-dir = all } diff --git a/regress/scripts/test-console.conf.in b/regress/scripts/test-console.conf.in index a19d5e1527..0fe916be5e 100644 --- a/regress/scripts/test-console.conf.in +++ b/regress/scripts/test-console.conf.in @@ -3,8 +3,8 @@ # Director { - Name = rufus-dir + Name = @hostname@-dir DIRport = 8101 - address = rufus + address = @hostname@ Password = "pNvX1WiXnwv2C/F7E52LGvw6rKjbbPvu2kyuPa9pVaL3" } diff --git a/regress/scripts/testa-bacula-dir.conf.in b/regress/scripts/testa-bacula-dir.conf.in index 554f71bc48..ed85af448f 100644 --- a/regress/scripts/testa-bacula-dir.conf.in +++ b/regress/scripts/testa-bacula-dir.conf.in @@ -5,7 +5,7 @@ # Director { # define myself - Name = rufus-dir + Name = @hostname@-dir DIRport = 8101 # where we listen for UA connections QueryFile = "@scriptdir@/query.sql" WorkingDirectory = "@working_dir@" @@ -20,7 +20,7 @@ Director { # define myself Job { Name = "MultiVol" Type = Backup - Client=rufus-fd + Client=@hostname@-fd Level = Full FileSet="Full Set" Storage = File @@ -34,7 +34,7 @@ Job { Name = "VerifyVolume" Type = Verify Level = VolumeToCatalog - Client=rufus-fd + Client=@hostname@-fd FileSet="Full Set" Storage = File Messages = Standard @@ -48,7 +48,7 @@ Job { Job { Name = "RestoreFiles" Type = Restore - Client=rufus-fd + Client=@hostname@-fd FileSet="Full Set" Storage = File Messages = Standard @@ -68,8 +68,8 @@ FileSet { # Client (File Services) to backup Client { - Name = rufus-fd - Address = rufus + Name = @hostname@-fd + Address = @hostname@ FDPort = 8102 Catalog = MyCatalog Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon @@ -81,7 +81,7 @@ Client { # Definiton of file storage device Storage { Name = File - Address = rufus # N.B. Use a fully qualified name here + Address = @hostname@ # N.B. Use a fully qualified name here SDPort = 8103 Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" Device = FileStorage @@ -90,7 +90,7 @@ Storage { Storage { Name = File1 - Address = rufus # N.B. Use a fully qualified name here + Address = @hostname@ # N.B. Use a fully qualified name here SDPort = 8103 Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" Device = FileStorage1 @@ -147,4 +147,3 @@ Pool { MaximumVolumeBytes = 10M LabelFormat = Small } - diff --git a/regress/tests/backup-bacula-test b/regress/tests/backup-bacula-test index 3e81db61a0..78c64077b9 100755 --- a/regress/tests/backup-bacula-test +++ b/regress/tests/backup-bacula-test @@ -13,7 +13,7 @@ bin/make_sqlite_tables echo " " echo " " echo " === Starting Backup Bacula Test ===" -echo " === Starting Backup Bacula Test ===" >>tmp/log +echo " === Starting Backup Bacula Test ===" >>working/log echo " " bin/bacula start @@ -42,7 +42,7 @@ quit END_OF_DATA sleep 2 bin/bacula stop -diff -ur build /tmp/bacula-restores${cwd}/build +diff -r build /tmp/bacula-restores${cwd}/build if [ $? != 0 ] ; then echo " " echo " " diff --git a/regress/tests/compressed-test b/regress/tests/compressed-test index bc37c03f7a..72792475e1 100755 --- a/regress/tests/compressed-test +++ b/regress/tests/compressed-test @@ -14,7 +14,7 @@ bin/make_sqlite_tables echo " " echo " " echo " === Starting compressed-test ===" -echo " === Starting compressed-test ===" >>tmp/log +echo " === Starting compressed-test ===" >>working/log echo " " bin/bacula start @@ -41,7 +41,7 @@ messages quit END_OF_DATA bin/bacula stop -diff -ur build /tmp/bacula-restores${cwd}/build +diff -r build /tmp/bacula-restores${cwd}/build if [ $? != 0 ] ; then echo " " echo " " diff --git a/regress/tests/six-vol-test b/regress/tests/six-vol-test index 2048f7507e..ffa1f770af 100755 --- a/regress/tests/six-vol-test +++ b/regress/tests/six-vol-test @@ -18,7 +18,7 @@ bin/make_sqlite_tables echo " " echo " " echo " === Starting two-vol-test ===" -echo " === Starting two-vol-test ===" >>tmp/log +echo " === Starting two-vol-test ===" >>working/log echo " " bin/bacula start @@ -41,7 +41,7 @@ messages quit END_OF_DATA bin/bacula stop -diff -ur tmp/largefile tmp/bacula-restores${cwd}/tmp/largefile +diff tmp/largefile tmp/bacula-restores${cwd}/tmp/largefile if [ $? != 0 ] ; then echo " " echo " " diff --git a/regress/tests/sparse-compressed-test b/regress/tests/sparse-compressed-test index 4087b6181f..c209aca8ed 100755 --- a/regress/tests/sparse-compressed-test +++ b/regress/tests/sparse-compressed-test @@ -14,7 +14,7 @@ bin/make_sqlite_tables echo " " echo " " echo " === Starting sparse-compressed-test ===" -echo " === Starting sparse-compressed-test ===" >>tmp/log +echo " === Starting sparse-compressed-test ===" >>working/log echo " " bin/bacula start @@ -42,7 +42,7 @@ quit END_OF_DATA bin/bacula stop -diff -ur build /tmp/bacula-restores${cwd}/build +diff -r build /tmp/bacula-restores${cwd}/build if [ $? != 0 ] ; then echo " " echo " " diff --git a/regress/tests/sparse-test b/regress/tests/sparse-test index 8b706ebf9c..f04f2f6009 100755 --- a/regress/tests/sparse-test +++ b/regress/tests/sparse-test @@ -14,7 +14,7 @@ bin/make_sqlite_tables echo " " echo " " echo " === Starting sparse-test ===" -echo " === Starting sparse-test ===" >>tmp/log +echo " === Starting sparse-test ===" >>working/log echo " " bin/bacula start @@ -41,7 +41,7 @@ messages quit END_OF_DATA bin/bacula stop -diff -ur build /tmp/bacula-restores${cwd}/build +diff -r build /tmp/bacula-restores${cwd}/build if [ $? != 0 ] ; then echo " " echo " " diff --git a/regress/tests/two-jobs-test b/regress/tests/two-jobs-test index fc66da77e9..3966eaaba6 100755 --- a/regress/tests/two-jobs-test +++ b/regress/tests/two-jobs-test @@ -14,7 +14,7 @@ bin/make_sqlite_tables echo " " echo " " echo " === Starting two-jobs-test ===" -echo " === Starting two-jobs-test ===" >>tmp/log +echo " === Starting two-jobs-test ===" >>working/log echo " " bin/bacula start @@ -53,7 +53,7 @@ messages quit END_OF_DATA bin/bacula stop -diff -ur build /tmp/bacula-restores${cwd}/build +diff -r build /tmp/bacula-restores${cwd}/build if [ $? != 0 ] ; then echo " " echo " " diff --git a/regress/tests/two-vol-test b/regress/tests/two-vol-test index e79bbe3332..25a30f3581 100755 --- a/regress/tests/two-vol-test +++ b/regress/tests/two-vol-test @@ -14,7 +14,7 @@ bin/make_sqlite_tables echo " " echo " " echo " === Starting two-vol-test ===" -echo " === Starting two-vol-test ===" >tmp/log +echo " === Starting two-vol-test ===" >working/log echo " " bin/bacula start @@ -46,7 +46,7 @@ messages quit END_OF_DATA bin/bacula stop -diff -ur build tmp/bacula-restores${cwd}/build +diff -r build tmp/bacula-restores${cwd}/build if [ $? != 0 ] ; then echo " " echo " " diff --git a/regress/tests/verify-vol-test b/regress/tests/verify-vol-test index 59de6970ba..a39ba27b13 100755 --- a/regress/tests/verify-vol-test +++ b/regress/tests/verify-vol-test @@ -14,7 +14,7 @@ bin/make_sqlite_tables echo " " echo " " echo " === Starting verify Volume Test ===" -echo " === Starting verify Volume Test ===" >>tmp/log +echo " === Starting verify Volume Test ===" >>working/log echo " " bin/bacula start