From bbe62f161f19e3c9e115e3f59db3608d37712812 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 19 Oct 2004 13:35:19 +0000 Subject: [PATCH] - Modified detection of largefiles to always set all flags regardless of the machine. - Modify autostart scripts to start Bacula late in the process and terminate it early. - Drop CDImages table in drop database tables scripts. - Alter casting of (void *) in gnome2-console/restore.c to pass by a (long int) so that it works with 64 bit machines. - Add more debug to heartbeat.c in FD for problem of dropped connections. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1656 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/autoconf/aclocal.m4 | 23 ++++++++--------------- bacula/autoconf/configure.in | 4 ++-- bacula/configure | 18 +++--------------- bacula/kernstodo | 4 ++++ bacula/platforms/alpha/bacula-fd.in | 2 +- bacula/platforms/bsdi/bacula-dir.in | 2 +- bacula/platforms/bsdi/bacula-fd.in | 2 +- bacula/platforms/bsdi/bacula-sd.in | 2 +- bacula/platforms/freebsd/bacula-dir.in | 2 +- bacula/platforms/freebsd/bacula-fd.in | 2 +- bacula/platforms/freebsd/bacula-sd.in | 2 +- bacula/platforms/gentoo/bacula-dir.in | 2 +- bacula/platforms/gentoo/bacula-fd.in | 2 +- bacula/platforms/gentoo/bacula-sd.in | 2 +- bacula/platforms/irix/bacula-dir.in | 2 +- bacula/platforms/irix/bacula-fd.in | 2 +- bacula/platforms/irix/bacula-sd.in | 2 +- bacula/platforms/mandrake/bacula-dir.in | 2 +- bacula/platforms/mandrake/bacula-fd.in | 2 +- bacula/platforms/mandrake/bacula-sd.in | 2 +- bacula/platforms/openbsd/bacula-dir.in | 2 +- bacula/platforms/openbsd/bacula-fd.in | 2 +- bacula/platforms/openbsd/bacula-sd.in | 2 +- bacula/platforms/redhat/bacula-dir.in | 2 +- bacula/platforms/redhat/bacula-fd.in | 2 +- bacula/platforms/redhat/bacula-sd.in | 2 +- bacula/platforms/solaris/bacula-dir.in | 2 +- bacula/platforms/solaris/bacula-fd.in | 2 +- bacula/platforms/solaris/bacula-sd.in | 2 +- bacula/platforms/suse/bacula-dir.in | 4 ++-- bacula/platforms/suse/bacula-fd.in | 4 ++-- bacula/platforms/suse/bacula-sd.in | 4 ++-- bacula/src/bacula.h | 1 + bacula/src/cats/drop_mysql_tables.in | 1 + bacula/src/cats/drop_postgresql_tables.in | 1 + bacula/src/filed/heartbeat.c | 8 ++++++-- bacula/src/gnome2-console/restore.c | 10 +++++----- bacula/src/lib/bnet.c | 1 + bacula/src/stored/append.c | 10 +++++----- bacula/src/stored/record.c | 2 +- bacula/src/version.h | 4 ++-- 41 files changed, 71 insertions(+), 78 deletions(-) diff --git a/bacula/autoconf/aclocal.m4 b/bacula/autoconf/aclocal.m4 index 1f3cfb8796..3f05d19f35 100644 --- a/bacula/autoconf/aclocal.m4 +++ b/bacula/autoconf/aclocal.m4 @@ -6,6 +6,11 @@ dnl For more details about this brain damage please see: dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html dnl Written by Paul Eggert . +dnl +dnl Modified by Kern Sibbald to turn on the large file +dnl flags on all machines. Otherwise functions such as +dnl fseek are not large file capable. +dnl dnl Internal subroutine of AC_SYS_LARGEFILE. dnl AC_SYS_LARGEFILE_FLAGS(FLAGSNAME) @@ -90,27 +95,15 @@ AC_DEFUN(AC_BAC_LARGEFILE, AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, ac_cv_sys_file_offset_bits, [Number of bits in a file offset, on hosts where this is settable.], - [case "$host_os" in - # HP-UX 10.20 and later - hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*) - ac_cv_sys_file_offset_bits=64 ;; - esac]) + [ac_cv_sys_file_offset_bits=64]) AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, ac_cv_sys_largefile_source, [Define to make fseeko etc. visible, on some hosts.], - [case "$host_os" in - # HP-UX 10.20 and later - hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*) - ac_cv_sys_largefile_source=1 ;; - esac]) + [ac_cv_sys_largefile_source=1]) AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, ac_cv_sys_large_files, [Define for large files, on AIX-style hosts.], - [case "$host_os" in - # AIX 4.2 and later - aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*) - ac_cv_sys_large_files=1 ;; - esac]) + [ac_cv_sys_large_files=1]) fi ]) dnl ========================================================== diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index 71fac94f32..56c2916080 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -398,7 +398,7 @@ if test x$support_conio = xyes; then ]) ], [ - AC_CHECK_HEADERS(curses.h) + AC_CHECK_HEADERS(curses.h) AC_CHECK_HEADER(term.h, [ AC_CHECK_LIB(curses, tgetent, [ CONS_LIBS="-lcurses" @@ -408,7 +408,7 @@ if test x$support_conio = xyes; then support_readline=no AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled]) ]) - ], + ], [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "], [#if HAVE_CURSES_H #include diff --git a/bacula/configure b/bacula/configure index a31ff10922..f97f4c880d 100755 --- a/bacula/configure +++ b/bacula/configure @@ -8261,11 +8261,7 @@ if test "${ac_cv_sys_file_offset_bits+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_sys_file_offset_bits=no - case "$host_os" in - # HP-UX 10.20 and later - hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*) - ac_cv_sys_file_offset_bits=64 ;; - esac + ac_cv_sys_file_offset_bits=64 for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do case "$ac_flag" in -D_FILE_OFFSET_BITS) @@ -8291,11 +8287,7 @@ if test "${ac_cv_sys_largefile_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_sys_largefile_source=no - case "$host_os" in - # HP-UX 10.20 and later - hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*) - ac_cv_sys_largefile_source=1 ;; - esac + ac_cv_sys_largefile_source=1 for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do case "$ac_flag" in -D_LARGEFILE_SOURCE) @@ -8321,11 +8313,7 @@ if test "${ac_cv_sys_large_files+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_sys_large_files=no - case "$host_os" in - # AIX 4.2 and later - aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*) - ac_cv_sys_large_files=1 ;; - esac + ac_cv_sys_large_files=1 for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do case "$ac_flag" in -D_LARGE_FILES) diff --git a/bacula/kernstodo b/bacula/kernstodo index 0b440a8289..e68648b10c 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -16,6 +16,8 @@ Version 1.35 Kern (see below) Maybe for 1.35: +- Despool attributes simultaneously with data in a separate + thread, rejoined at end of data spooling. - Implement Files/Bytes,... stats for restore job. - Implement Total Bytes Written, ... for restore job. - Check dates entered by user for correctness (month/day/... ranges) @@ -1384,3 +1386,5 @@ Block Position: 0 scripts to add them. - Modify postgresql update script to remove bigint FilenameId reference. +- Kill daemons at levels in the teens rather than late. + diff --git a/bacula/platforms/alpha/bacula-fd.in b/bacula/platforms/alpha/bacula-fd.in index ebcf572c31..c7b5e28f05 100644 --- a/bacula/platforms/alpha/bacula-fd.in +++ b/bacula/platforms/alpha/bacula-fd.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula File daemon. # -# chkconfig: 2345 20 99 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # diff --git a/bacula/platforms/bsdi/bacula-dir.in b/bacula/platforms/bsdi/bacula-dir.in index 8ff091906e..e7e76b1618 100755 --- a/bacula/platforms/bsdi/bacula-dir.in +++ b/bacula/platforms/bsdi/bacula-dir.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula Director daemon # -# chkconfig: 2345 20 99 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/bsdi/bacula-fd.in b/bacula/platforms/bsdi/bacula-fd.in index 9f26adea5d..54f17b9a96 100755 --- a/bacula/platforms/bsdi/bacula-fd.in +++ b/bacula/platforms/bsdi/bacula-fd.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula File daemon. # -# chkconfig: 2345 20 99 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/bsdi/bacula-sd.in b/bacula/platforms/bsdi/bacula-sd.in index 79e1a91ee6..fb55fb47cf 100755 --- a/bacula/platforms/bsdi/bacula-sd.in +++ b/bacula/platforms/bsdi/bacula-sd.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula Storage daemon. # -# chkconfig: 2345 20 99 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/freebsd/bacula-dir.in b/bacula/platforms/freebsd/bacula-dir.in index 8ff091906e..e7e76b1618 100755 --- a/bacula/platforms/freebsd/bacula-dir.in +++ b/bacula/platforms/freebsd/bacula-dir.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula Director daemon # -# chkconfig: 2345 20 99 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/freebsd/bacula-fd.in b/bacula/platforms/freebsd/bacula-fd.in index 9f26adea5d..54f17b9a96 100755 --- a/bacula/platforms/freebsd/bacula-fd.in +++ b/bacula/platforms/freebsd/bacula-fd.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula File daemon. # -# chkconfig: 2345 20 99 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/freebsd/bacula-sd.in b/bacula/platforms/freebsd/bacula-sd.in index 79e1a91ee6..fb55fb47cf 100755 --- a/bacula/platforms/freebsd/bacula-sd.in +++ b/bacula/platforms/freebsd/bacula-sd.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula Storage daemon. # -# chkconfig: 2345 20 99 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/gentoo/bacula-dir.in b/bacula/platforms/gentoo/bacula-dir.in index 915bdbf98a..9ce3b0b649 100755 --- a/bacula/platforms/gentoo/bacula-dir.in +++ b/bacula/platforms/gentoo/bacula-dir.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula Director daemon for the Gentoo release # -# chkconfig: 2345 20 99 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/gentoo/bacula-fd.in b/bacula/platforms/gentoo/bacula-fd.in index 7de65ef48f..67e335ab77 100755 --- a/bacula/platforms/gentoo/bacula-fd.in +++ b/bacula/platforms/gentoo/bacula-fd.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula File daemon for the Gentoo release. # -# chkconfig: 2345 20 99 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/gentoo/bacula-sd.in b/bacula/platforms/gentoo/bacula-sd.in index bf6ffd490b..753416e114 100755 --- a/bacula/platforms/gentoo/bacula-sd.in +++ b/bacula/platforms/gentoo/bacula-sd.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula Storage daemon for the Gentoo release. # -# chkconfig: 2345 20 99 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/irix/bacula-dir.in b/bacula/platforms/irix/bacula-dir.in index 8ff091906e..e7e76b1618 100755 --- a/bacula/platforms/irix/bacula-dir.in +++ b/bacula/platforms/irix/bacula-dir.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula Director daemon # -# chkconfig: 2345 20 99 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/irix/bacula-fd.in b/bacula/platforms/irix/bacula-fd.in index 2a287e6cc5..d7672d3f51 100755 --- a/bacula/platforms/irix/bacula-fd.in +++ b/bacula/platforms/irix/bacula-fd.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula File daemon. # -# chkconfig: 2345 20 99 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/irix/bacula-sd.in b/bacula/platforms/irix/bacula-sd.in index 79e1a91ee6..fb55fb47cf 100755 --- a/bacula/platforms/irix/bacula-sd.in +++ b/bacula/platforms/irix/bacula-sd.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula Storage daemon. # -# chkconfig: 2345 20 99 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/mandrake/bacula-dir.in b/bacula/platforms/mandrake/bacula-dir.in index d568cdb999..0f82a1a4a5 100755 --- a/bacula/platforms/mandrake/bacula-dir.in +++ b/bacula/platforms/mandrake/bacula-dir.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula Director daemon # -# chkconfig: 2345 20 99 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/mandrake/bacula-fd.in b/bacula/platforms/mandrake/bacula-fd.in index 19f04f028b..a6f31e9198 100755 --- a/bacula/platforms/mandrake/bacula-fd.in +++ b/bacula/platforms/mandrake/bacula-fd.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula File daemon. # -# chkconfig: 2345 20 99 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/mandrake/bacula-sd.in b/bacula/platforms/mandrake/bacula-sd.in index a4bfdd4f5a..f496b14f88 100755 --- a/bacula/platforms/mandrake/bacula-sd.in +++ b/bacula/platforms/mandrake/bacula-sd.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula Storage daemon. # -# chkconfig: 2345 20 99 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/openbsd/bacula-dir.in b/bacula/platforms/openbsd/bacula-dir.in index 8ff091906e..2ae3e5420b 100755 --- a/bacula/platforms/openbsd/bacula-dir.in +++ b/bacula/platforms/openbsd/bacula-dir.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula Director daemon # -# chkconfig: 2345 20 99 +# chkconfig: 2345 20 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/openbsd/bacula-fd.in b/bacula/platforms/openbsd/bacula-fd.in index 9f26adea5d..54f17b9a96 100755 --- a/bacula/platforms/openbsd/bacula-fd.in +++ b/bacula/platforms/openbsd/bacula-fd.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula File daemon. # -# chkconfig: 2345 20 99 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/openbsd/bacula-sd.in b/bacula/platforms/openbsd/bacula-sd.in index 79e1a91ee6..ac86999824 100755 --- a/bacula/platforms/openbsd/bacula-sd.in +++ b/bacula/platforms/openbsd/bacula-sd.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula Storage daemon. # -# chkconfig: 2345 20 99 +# chkconfig: 2345 20 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/redhat/bacula-dir.in b/bacula/platforms/redhat/bacula-dir.in index 4b5dc8eee2..86131c92f5 100755 --- a/bacula/platforms/redhat/bacula-dir.in +++ b/bacula/platforms/redhat/bacula-dir.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula Director daemon # -# chkconfig: 2345 92 99 +# chkconfig: 2345 92 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/redhat/bacula-fd.in b/bacula/platforms/redhat/bacula-fd.in index 1d5a042901..f288f7d2b6 100755 --- a/bacula/platforms/redhat/bacula-fd.in +++ b/bacula/platforms/redhat/bacula-fd.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula File daemon. # -# chkconfig: 2345 91 99 +# chkconfig: 2345 91 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/redhat/bacula-sd.in b/bacula/platforms/redhat/bacula-sd.in index 4ba08f22ff..ca8179fb13 100755 --- a/bacula/platforms/redhat/bacula-sd.in +++ b/bacula/platforms/redhat/bacula-sd.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula Storage daemon. # -# chkconfig: 2345 90 99 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/solaris/bacula-dir.in b/bacula/platforms/solaris/bacula-dir.in index 8ff091906e..bd433b1625 100755 --- a/bacula/platforms/solaris/bacula-dir.in +++ b/bacula/platforms/solaris/bacula-dir.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula Director daemon # -# chkconfig: 2345 20 99 +# chkconfig: 2345 92 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/solaris/bacula-fd.in b/bacula/platforms/solaris/bacula-fd.in index 9f26adea5d..14160a7643 100755 --- a/bacula/platforms/solaris/bacula-fd.in +++ b/bacula/platforms/solaris/bacula-fd.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula File daemon. # -# chkconfig: 2345 20 99 +# chkconfig: 2345 91 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/solaris/bacula-sd.in b/bacula/platforms/solaris/bacula-sd.in index 79e1a91ee6..fb55fb47cf 100755 --- a/bacula/platforms/solaris/bacula-sd.in +++ b/bacula/platforms/solaris/bacula-sd.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula Storage daemon. # -# chkconfig: 2345 20 99 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/suse/bacula-dir.in b/bacula/platforms/suse/bacula-dir.in index 8af07e35a0..c4d17bb903 100755 --- a/bacula/platforms/suse/bacula-dir.in +++ b/bacula/platforms/suse/bacula-dir.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula Director daemon # -# chkconfig: 2345 90 99 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ @@ -16,7 +16,7 @@ # Required-Start: $local_fs $network @DB_NAME@ # Required-Stop: $local_fs $network @DB_NAME@ # Default-Start: 3 5 -# Default-Stop: 0 1 2 6 +# Default-Stop: 0 1 2 6 # Short-Description: bacula director # Description: Bacula network backup system director daemon ### END INIT INFO diff --git a/bacula/platforms/suse/bacula-fd.in b/bacula/platforms/suse/bacula-fd.in index f868177baf..d8363de5f3 100755 --- a/bacula/platforms/suse/bacula-fd.in +++ b/bacula/platforms/suse/bacula-fd.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula File daemon. # -# chkconfig: 2345 90 99 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ @@ -16,7 +16,7 @@ # Required-Start: $local_fs $network @DB_NAME@ # Required-Stop: $local_fs $network @DB_NAME@ # Default-Start: 3 5 -# Default-Stop: 0 1 2 6 +# Default-Stop: 0 1 2 6 # Short-Description: bacula file daemon # Description: Bacula network backup system file daemon ### END INIT INFO diff --git a/bacula/platforms/suse/bacula-sd.in b/bacula/platforms/suse/bacula-sd.in index f0fa5e4827..e772cb79e2 100755 --- a/bacula/platforms/suse/bacula-sd.in +++ b/bacula/platforms/suse/bacula-sd.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula Storage daemon. # -# chkconfig: 2345 90 99 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ @@ -16,7 +16,7 @@ # Required-Start: $local_fs $network @DB_NAME@ # Required-Stop: $local_fs $network @DB_NAME@ # Default-Start: 3 5 -# Default-Stop: 0 1 2 6 +# Default-Stop: 0 1 2 6 # Short-Description: bacula storage daemon # Description: Bacula network backup system storage daemon ### END INIT INFO diff --git a/bacula/src/bacula.h b/bacula/src/bacula.h index 726c7ac880..6e2bf2769b 100644 --- a/bacula/src/bacula.h +++ b/bacula/src/bacula.h @@ -45,6 +45,7 @@ #define _THREAD_SAFE 1 #define _POSIX_PTHREAD_SEMANTICS 1 + /* System includes */ #if HAVE_STDINT_H #include diff --git a/bacula/src/cats/drop_mysql_tables.in b/bacula/src/cats/drop_mysql_tables.in index ff97be8fad..3c5fc9aaba 100644 --- a/bacula/src/cats/drop_mysql_tables.in +++ b/bacula/src/cats/drop_mysql_tables.in @@ -22,6 +22,7 @@ DROP TABLE IF EXISTS Version; DROP TABLE IF EXISTS Counters; DROP TABLE IF EXISTS BaseFiles; DROP TABLE IF EXISTS UnsavedFiles; +DROP TABLE IF EXISTS CDImages; END-OF-DATA then echo "Deletion of Bacula MySQL tables succeeded." diff --git a/bacula/src/cats/drop_postgresql_tables.in b/bacula/src/cats/drop_postgresql_tables.in index f7cf26dda8..35ec377845 100644 --- a/bacula/src/cats/drop_postgresql_tables.in +++ b/bacula/src/cats/drop_postgresql_tables.in @@ -19,6 +19,7 @@ drop table path; drop table filename; drop table counters; drop table version; +drop table CDImages; END-OF-DATA then echo "Deletion of Bacula PostgreSQL tables succeeded." diff --git a/bacula/src/filed/heartbeat.c b/bacula/src/filed/heartbeat.c index 0bda4f485c..edbad95136 100644 --- a/bacula/src/filed/heartbeat.c +++ b/bacula/src/filed/heartbeat.c @@ -69,7 +69,7 @@ extern "C" void *sd_heartbeat_thread(void *arg) /* Hang reading the socket to the SD, and every time we get * a heartbeat or we get a wait timeout (1 minute), we * check to see if we need to send a heartbeat to the - * Directory. + * Director. */ for ( ; !is_bnet_stop(sd); ) { n = bnet_wait_data_intr(sd, WAIT_INTERVAL); @@ -82,7 +82,11 @@ extern "C" void *sd_heartbeat_thread(void *arg) } if (n == 1) { /* input waiting */ bnet_recv(sd); /* read it -- probably heartbeat from sd */ - Dmsg1(100, "Got %d from SD\n", sd->msglen); + if (sd->msglen <= 0) { + Dmsg1(100, "Got BNET_SIG %d from SD\n", sd->msglen); + } else { + Dmsg2(100, "Got %d bytes from SD. MSG=%s\n", sd->msglen, sd->msg); + } } } bnet_close(sd); diff --git a/bacula/src/gnome2-console/restore.c b/bacula/src/gnome2-console/restore.c index 65e849c240..850c0e88af 100755 --- a/bacula/src/gnome2-console/restore.c +++ b/bacula/src/gnome2-console/restore.c @@ -95,7 +95,7 @@ on_restore_add_button_clicked(GtkButton *button, gpointer user_data) int row; for (int i=0; i < num_selected; i++) { - row = (int)g_list_nth_data(restore->list->selection, i); + row = (int)(long int)g_list_nth_data(restore->list->selection, i); mark_row(row, true); } } @@ -108,7 +108,7 @@ on_restore_remove_button_clicked(GtkButton *button, gpointer user_data) int row; for (int i=0; i < num_selected; i++) { - row = (int)g_list_nth_data(restore->list->selection, i); + row = (int)(long int)g_list_nth_data(restore->list->selection, i); mark_row(row, false); } } @@ -307,11 +307,11 @@ static void select_row_cb(GtkCList *item, gint row, gint column, len = strlen(file); if (len > 0 && file[len-1] == '/') { /* Change to new directory */ - pm_strcpy(&restore->path, restore->fname); + pm_strcpy(restore->path, restore->fname); if (*file == '*') { - Mmsg(&restore->fname, "%s%s", restore->path, file+1); + Mmsg(restore->fname, "%s%s", restore->path, file+1); } else { - Mmsg(&restore->fname, "%s%s", restore->path, file); + Mmsg(restore->fname, "%s%s", restore->path, file); } FillDirectory(restore->fname, restore); } diff --git a/bacula/src/lib/bnet.c b/bacula/src/lib/bnet.c index 7f5cdbb440..54df1e66aa 100644 --- a/bacula/src/lib/bnet.c +++ b/bacula/src/lib/bnet.c @@ -162,6 +162,7 @@ int32_t bnet_recv(BSOCK * bsock) ASSERT(bsock != NULL); bsock->msg[0] = 0; + bsock->msglen = 0; if (bsock->errors || bsock->terminated) { return BNET_HARDEOF; } diff --git a/bacula/src/stored/append.c b/bacula/src/stored/append.c index 2b5cbc5bf5..648d44cab0 100644 --- a/bacula/src/stored/append.c +++ b/bacula/src/stored/append.c @@ -164,7 +164,7 @@ bool do_append_data(JCR *jcr) } stream = (int32_t)str_to_int64(p); - Dmsg2(490, " 0 && (file_index == last_file_index || file_index == last_file_index + 1))) { @@ -188,12 +188,12 @@ bool do_append_data(JCR *jcr) rec.data_len = ds->msglen; rec.data = ds->msg; /* use message buffer */ - Dmsg4(450, "before writ_rec FI=%d SessId=%d Strm=%s len=%d\n", + Dmsg4(850, "before writ_rec FI=%d SessId=%d Strm=%s len=%d\n", rec.FileIndex, rec.VolSessionId, stream_to_ascii(rec.Stream,rec.FileIndex), rec.data_len); while (!write_record_to_block(dcr->block, &rec)) { - Dmsg2(650, "!write_record_to_block data_len=%d rem=%d\n", rec.data_len, + Dmsg2(850, "!write_record_to_block data_len=%d rem=%d\n", rec.data_len, rec.remainder); if (!write_block_to_device(dcr)) { Dmsg2(90, "Got write_block_to_dev error on device %s. %s\n", @@ -209,7 +209,7 @@ bool do_append_data(JCR *jcr) break; } jcr->JobBytes += rec.data_len; /* increment bytes this job */ - Dmsg4(350, "write_record FI=%s SessId=%d Strm=%s len=%d\n", + Dmsg4(850, "write_record FI=%s SessId=%d Strm=%s len=%d\n", FI_to_ascii(rec.FileIndex), rec.VolSessionId, stream_to_ascii(rec.Stream, rec.FileIndex), rec.data_len); @@ -220,7 +220,7 @@ bool do_append_data(JCR *jcr) if (are_attributes_spooled(jcr)) { jcr->dir_bsock->spool = true; } - Dmsg0(350, "Send attributes.\n"); + Dmsg0(850, "Send attributes to dir.\n"); if (!dir_update_file_attributes(dcr, &rec)) { jcr->dir_bsock->spool = false; Jmsg(jcr, M_FATAL, 0, _("Error updating file attributes. ERR=%s\n"), diff --git a/bacula/src/stored/record.c b/bacula/src/stored/record.c index ce68807165..616b068abd 100644 --- a/bacula/src/stored/record.c +++ b/bacula/src/stored/record.c @@ -204,7 +204,7 @@ bool write_record_to_block(DEV_BLOCK *block, DEV_RECORD *rec) ASSERT(block->binbuf == (uint32_t) (block->bufp - block->buf)); ASSERT(block->buf_len >= block->binbuf); - Dmsg6(490, "write_record_to_block() FI=%s SessId=%d Strm=%s len=%d\n\ + Dmsg6(890, "write_record_to_block() FI=%s SessId=%d Strm=%s len=%d\n\ rem=%d remainder=%d\n", FI_to_ascii(rec->FileIndex), rec->VolSessionId, stream_to_ascii(rec->Stream, rec->FileIndex), rec->data_len, diff --git a/bacula/src/version.h b/bacula/src/version.h index 921434b8f3..c22963616d 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -1,8 +1,8 @@ /* */ #undef VERSION #define VERSION "1.35.9" -#define BDATE "18 October 2004" -#define LSMDATE "18Oct04" +#define BDATE "19 October 2004" +#define LSMDATE "19Oct04" /* Debug flags */ #undef DEBUG -- 2.39.2