]> git.sur5r.net Git - bacula/bacula/commitdiff
Make machine name independent + move log to working
authorKern Sibbald <kern@sibbald.com>
Fri, 30 May 2003 10:21:02 +0000 (10:21 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 30 May 2003 10:21:02 +0000 (10:21 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@555 91ce42f0-d328-0410-95d8-f526ca767f89

15 files changed:
regress/scripts/do_sed
regress/scripts/regress-config
regress/scripts/test-bacula-dir.conf.in
regress/scripts/test-bacula-fd.conf.in
regress/scripts/test-bacula-sd.conf.in
regress/scripts/test-console.conf.in
regress/scripts/testa-bacula-dir.conf.in
regress/tests/backup-bacula-test
regress/tests/compressed-test
regress/tests/six-vol-test
regress/tests/sparse-compressed-test
regress/tests/sparse-test
regress/tests/two-jobs-test
regress/tests/two-vol-test
regress/tests/verify-vol-test

index e0615539e40e3c6c6dd0644a8b0e4c235f0b5564..49cf3b41106483f0351c28096288d55f5f579aa6 100755 (executable)
@@ -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
index 0241deb53222d50e964334c7f2943290767b2e41..e03e84bc27c66afb403f228e2457363b3c1ca685 100755 (executable)
@@ -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 \
index 1e83005da83f311942a204c32f4b615ccdd96357..94bd6f1b36fbd5a4bbf5dfce1abbe4c1a2f4af26 100644 (file)
@@ -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"
index c9c21b6615b0bd625a8c454ae64806114e667f24..c5554bbfac98ee3d721196babdd5b36edbd50677 100644 (file)
@@ -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
 }
index 8ff990b5ef7c0f5504085d2c50e85bb1a7f67235..d05bbf76cacb85a651e061ecc6cf511fc5238731 100644 (file)
@@ -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
 }
index a19d5e1527f14a49ff94df1854587248d7c75c81..0fe916be5e14e2ba95a279bde676d95a2448d297 100644 (file)
@@ -3,8 +3,8 @@
 #
 
 Director {
-  Name = rufus-dir
+  Name = @hostname@-dir
   DIRport = 8101
-  address = rufus
+  address = @hostname@
   Password = "pNvX1WiXnwv2C/F7E52LGvw6rKjbbPvu2kyuPa9pVaL3"
 }
index 554f71bc48a23e701f297cf96741e2bdeb840e9b..ed85af448f18ae897f1806d2850c117e2233268d 100644 (file)
@@ -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
 }
-
index 3e81db61a082940abb9d9b97eeb89f7360a894ef..78c64077b9ec39aa70c9588bc542186e69e61dfa 100755 (executable)
@@ -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 " "
index bc37c03f7abda184abd1305213401544bc54f061..72792475e1de8ef0e64d64385e45de39b7230d52 100755 (executable)
@@ -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 " "
index 2048f7507e74e36e7558b6d0521b1fb780b747b5..ffa1f770affdc223ec97881f51cbed556607f7d1 100755 (executable)
@@ -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 " "
index 4087b6181ff7eb487ac0db15eea15792f5c810ba..c209aca8ed18c62692e9548bc63bffa29e572ad2 100755 (executable)
@@ -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 " "
index 8b706ebf9cd3570c79d68560ea5930612172f5c7..f04f2f60091147356419ab5238f1e14ae60083df 100755 (executable)
@@ -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 " "
index fc66da77e98db99c90a773a139fade022861662b..3966eaaba6e99149759cbed45070c7dbf7a1edc2 100755 (executable)
@@ -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 " "
index e79bbe33323b167f20c22b66745488fcfa41161b..25a30f3581c161b4d2f9139d740685a7e9de1abd 100755 (executable)
@@ -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 " "
index 59de6970bae23602e2881c282adc6241b8213559..a39ba27b13024b76133d0853bc8a557c0569ae94 100755 (executable)
@@ -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