From b8b72992fc8c733cfaedf6885cd83b9e317e6933 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 29 Apr 2007 14:48:34 +0000 Subject: [PATCH] kes Reapply my bat.conf install script in qt-console. I think I editted bat.pro instead of bat.pro.in and it was lost. kes Apply CentOS patches someone sent me. Checks for /var/run/subsys, the /var/lock/subsys for subsysdir. Also corrects typos in the doc. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4655 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/autoconf/configure.in | 9 ++++++++- bacula/configure | 9 ++++++++- bacula/src/findlib/attribs.c | 3 ++- bacula/src/lib/lex.c | 18 +++++++++--------- bacula/src/qt-console/bat.pro.in | 2 +- bacula/technotes-2.1 | 6 ++++++ 6 files changed, 34 insertions(+), 13 deletions(-) diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index 4198789488..b32e7410be 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -960,7 +960,14 @@ AC_SUBST(piddir) # ------------------------------------ # Where to place subsys "lock file" # ------------------------------------ -subsysdir=/var/run/subsys +ubsysdir=/var/run/subsys +if test -d /var/run/subsys; then + subsysdir=/var/run/subsys +elif test -d /var/lock/subsys; then + subsysdir=/var/lock/subsys +else + subsysdir=/var/run/subsys +fi AC_ARG_WITH(subsys-dir, [ --with-subsys-dir=PATH specify location of Bacula subsys file], [ diff --git a/bacula/configure b/bacula/configure index 0ca88b11e8..6987e299aa 100755 --- a/bacula/configure +++ b/bacula/configure @@ -18358,7 +18358,14 @@ _ACEOF # ------------------------------------ # Where to place subsys "lock file" # ------------------------------------ -subsysdir=/var/run/subsys +ubsysdir=/var/run/subsys +if test -d /var/run/subsys; then + subsysdir=/var/run/subsys +elif test -d /var/lock/subsys; then + subsysdir=/var/lock/subsys +else + subsysdir=/var/run/subsys +fi # Check whether --with-subsys-dir was given. if test "${with_subsys_dir+set}" = set; then diff --git a/bacula/src/findlib/attribs.c b/bacula/src/findlib/attribs.c index d747543e18..f04acee3b2 100644 --- a/bacula/src/findlib/attribs.c +++ b/bacula/src/findlib/attribs.c @@ -403,7 +403,8 @@ bool set_attributes(JCR *jcr, ATTR *attr, BFILE *ofd) char ec1[50], ec2[50]; fsize = blseek(ofd, 0, SEEK_END); bclose(ofd); /* first close file */ - if (attr->type == FT_REG && fsize > 0 && fsize != (boffset_t)attr->statp.st_size) { + if (attr->type == FT_REG && fsize > 0 && attr->statp.st_size > 0 && + fsize != (boffset_t)attr->statp.st_size) { Jmsg3(jcr, M_ERROR, 0, _("File size of restored file %s not correct. Original %s, restored %s.\n"), attr->ofname, edit_uint64(attr->statp.st_size, ec1), edit_uint64(fsize, ec2)); diff --git a/bacula/src/lib/lex.c b/bacula/src/lib/lex.c index 8eb6df75db..e7fcc559e5 100644 --- a/bacula/src/lib/lex.c +++ b/bacula/src/lib/lex.c @@ -1,15 +1,7 @@ -/* - * Lexical scanner for Bacula configuration file - * - * Kern Sibbald, 2000 - * - * Version $Id$ - * - */ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2006 Free Software Foundation Europe e.V. + Copyright (C) 2000-2007 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -33,6 +25,14 @@ (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich, Switzerland, email:ftf@fsfeurope.org. */ +/* + * Lexical scanner for Bacula configuration file + * + * Kern Sibbald, 2000 + * + * Version $Id$ + * + */ #include "bacula.h" #include "lex.h" diff --git a/bacula/src/qt-console/bat.pro.in b/bacula/src/qt-console/bat.pro.in index a7ee540f28..f781f18f3f 100644 --- a/bacula/src/qt-console/bat.pro.in +++ b/bacula/src/qt-console/bat.pro.in @@ -12,7 +12,7 @@ CONFIG += qt debug bins.path = /$(DESTDIR)@sbindir@ bins.files = ./bat confs.path = /$(DESTDIR)@sysconfdir@ -confs.files = ./bat.conf +confs.commands = ./install_conf_file TEMPLATE = app TARGET = bat diff --git a/bacula/technotes-2.1 b/bacula/technotes-2.1 index aab57c1480..1fd75de59a 100644 --- a/bacula/technotes-2.1 +++ b/bacula/technotes-2.1 @@ -1,6 +1,12 @@ Technical notes on version 2.1 General: +29Apr07 +kes Reapply my bat.conf install script in qt-console. I think I + editted bat.pro instead of bat.pro.in and it was lost. +kes Apply CentOS patches someone sent me. Checks for /var/run/subsys, + the /var/lock/subsys for subsysdir. Also corrects typos in the + doc. 28Apr07 kes First cut update job. kes Correct configure to include qmake of src/qt-console directory. -- 2.39.5