From d7864ae5b7d0b363a8d88947d11ffdbedde1beb8 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Wed, 11 Oct 2006 22:40:53 +0000 Subject: [PATCH] Send M_ERROR_TERM and M_ABORT messages to stdout on Windows. Fix cleanup of spool files on Windows. Fix Windows 9x compatibility. Remove /silent option from daemons on Windows. The new default is the same as the old /silent. To enable the message boxes that previously were suppressed by /silent you must add /debug instead. Add new /debug option. This option enables the message boxes that previously were suppressed by the /silent option. In addition the daemons will open a console window if this option is used. Fix bug with service not being removed on migrated installs. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3548 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/lib/message.c | 2 -- bacula/src/stored/stored.c | 12 ++++++++++-- bacula/technotes-1.39 | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a/bacula/src/lib/message.c b/bacula/src/lib/message.c index 15a939590e..7b411d5b3c 100755 --- a/bacula/src/lib/message.c +++ b/bacula/src/lib/message.c @@ -596,11 +596,9 @@ void dispatch_message(JCR *jcr, int type, time_t mtime, char *msg) } if (type == M_ABORT || type == M_ERROR_TERM) { -#if !defined(HAVE_WIN32) fputs(dt, stdout); fputs(msg, stdout); /* print this here to INSURE that it is printed */ fflush(stdout); -#endif } /* Now figure out where to send the message */ diff --git a/bacula/src/stored/stored.c b/bacula/src/stored/stored.c index 26205e2024..aa6c47ad07 100644 --- a/bacula/src/stored/stored.c +++ b/bacula/src/stored/stored.c @@ -418,16 +418,24 @@ static void cleanup_old_files() { POOLMEM *cleanup = get_pool_memory(PM_MESSAGE); int len = strlen(me->working_directory); +#if defined(HAVE_WIN32) + pm_strcpy(cleanup, "del /q "); +#else pm_strcpy(cleanup, "/bin/rm -f "); +#endif pm_strcat(cleanup, me->working_directory); - if (len > 0 && me->working_directory[len-1] != '/') { + if (len > 0 && me->working_directory[len-1] != '/' +#if defined(HAVE_WIN32) + && me->working_directory[len-1] != '\\' +#endif + ) { pm_strcat(cleanup, "/"); } pm_strcat(cleanup, my_name); pm_strcat(cleanup, "*.spool"); run_program(cleanup, 0, NULL); free_pool_memory(cleanup); -} +} /* diff --git a/bacula/technotes-1.39 b/bacula/technotes-1.39 index 17fdda22a0..f17f9edbf3 100644 --- a/bacula/technotes-1.39 +++ b/bacula/technotes-1.39 @@ -4,6 +4,36 @@ General: 11Oct06 kes Correct mtx-changer bug that I introduced in a recent commit, and pointed out by Robert Nelson -- thanks. +rbn Fix Windows' daemons so that messages print to stdout if not + running as a service. +rbn Add daemon name to trace file name (eg bacula-dir.trace). +rbn Fix environment variable expansion in directory names on Windows. +rbn Fix autochanger support in fill command. +rbn Update SQL scripts to match Unix versions. +rbn Fix daemon usage displays. +rbn Cleanup bacula-dir.conf template. +rbn Install openssl.cnf so that the openssl.exe installed in the + Bacula\bin directory can be used to generate keys and + certificates for TLS and encryption. +rbn Fix cleanup of spool files on Windows. +rbn Remove /silent option from daemons on Windows. The new default + is the same as the old /silent. To enable the message boxes that + previously were suppressed by /silent you must add /debug instead. + NOTE: As a result of this change, the first time you upgrade from + a previous version of 1.39.x you will receive the message + boxes when the remove of the old services succeeds. This + is the same behaviour as when migrating from a version prior + to 1.39.0. + However, going forward, these message boxes will not appear on + upgrades or new installs. +rbn Add new /debug option. This option enables the message boxes that + previously were suppressed by the /silent option. In addition the + daemons running as services will open a console window if this + option is used. +rbn Fix bug with service not being removed on migrated installs. This + should correct those cases where the file daemon install was failing + when upgrading from versions prior to 1.39.x. + 08Oct06 kes Turn on heap reporting in Dir with zero debug level. kes Send a message to the sys log when Bacula forces a SEG FAULT, and @@ -24,6 +54,12 @@ kes Modify the autochanger loaded?, load, and unload commands to print kes Correct a few Win32 errno returns in the VSS code so that hopefully a resonable Win32 error message will be printed. kes Convert a few strcat()... to bstrncat() in the Win32 code. +06Oct06 +rbn Added Windows version of bsmtp. +rbn Fixed path search for Windows so that Bacula\bin is automatically + searched for programs and scripts. +rbn Fixed bugs in mtx-changer.cmd and made template bacula-sd.conf + Windows specific. Version 1.39.24 released: 02Oct06 -- 2.39.5