]> git.sur5r.net Git - bacula/bacula/commitdiff
Final changes
authorKern Sibbald <kern@sibbald.com>
Wed, 24 Mar 2004 15:27:45 +0000 (15:27 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 24 Mar 2004 15:27:45 +0000 (15:27 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1148 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/ChangeLog
bacula/ReleaseNotes
bacula/autoconf/configure.in
bacula/configure
bacula/kernstodo
bacula/src/cats/sql_get.c
bacula/src/dird/ua_cmds.c
bacula/src/dird/ua_purge.c
bacula/src/dird/ua_query.c
bacula/src/version.h
bacula/src/win32/winbacula.nsi.in

index 3415de833ca1bb8a862d5b7caf9d59b9dc93e44e..bad993d5bf2ee3b1b45d6cc01e665aa3ab2af7b4 100644 (file)
@@ -1,4 +1,16 @@
 
+24Mar04
+- Apply corrected SQL to sql_get.c supplied by Dan Langille.
+- Implement "delete job jobid=xxx jobid=yyy ..."
+- Implemente "purge volume=xxx volume=yyy ..."
+- Fix buffer overrun in query string substitution.
+22Mar04
+- Fix bad format %s instead of %d for editing new slot in update volume.
+  Reported by Vadim Zotov.
+- Better error diagnostics in ./configure for detecting termcap library.
+20Mar04
+- Restore old sql.c split_path and file name since it seems to have
+  broken the Verify stuff.
 19Mar04
 - Hunt down missing free_locked_jcr() in SD that caused zombies.
 - Modify status outputs to be more consistent for zombie checking.
index 4f83db8686f96949262ef68479596c79501af0d9..f3e20fee7712e4e70ddc5f8b6c795263316e1d47 100644 (file)
@@ -1,7 +1,24 @@
 
           Release Notes for Bacula 1.33.4
 
-  Bacula code: Total files = 301 Total lines = 89,118 (*.h *.c *.in)
+  Bacula code: Total files = 306 Total lines = 90,715 (*.h *.c *.in)
+
+Major Features:
+- Data spooling which eliminates tape shoe-shine during Inc backups,         
+  and permits multiple simultaneous backups without interleaved blocks.
+- Polling of devices eliminating need to unmount and mount from
+  console.
+- Native Win32 client -- much faster and restores permissions correctly
+  (thanks to Christopher Hull)
+- PostgreSQL database driver (thanks to Dan Langille).
+- Improved Autochange support of Slots (update slots scan).
+- Autochanger support for multiple drives.
+- New conio code to implement Console command line editing and history.
+- JobDefs resource permits smaller .conf files for Director
+- Access console lists for the Console
+- Pool level overrides.
+- Daemon statistics memory.
+- Improved btape "test" and "fill" commands.
 
 New directives:
 - "Close on Poll = yes/no" in SD Device resource.
@@ -39,14 +56,11 @@ New Commands:
 - "unmarkdir" command in restore tree.
 - "quit" command in restore tree.
 - Trace option on "setdebug trace=1/0 ..."
+- Update slots scan
 
 
-Most Significant Changes since 1.32f-4
-- Native Win32 Client -- much faster and does better restores than old
-  Cygwin Win32 Client.
+Additional changes:
 - Implement Gnome 2.0 restore GUI
-- Implement data spooling
-- Implement Volume Polling
 - Add a missing unlock in the jobq handler.
 - Fix bug where a soft linked file and a directory had the same name
   by treating the soft link as a directory and putting the entries under
@@ -99,10 +113,8 @@ Most Significant Changes since 1.32f-4
 - Fixed seg fault in restore of multiple simultaneous jobs to 
   a single Volume.
 - Fixed thread race problem in multiple simultaneous jobs to
-  a single Volume where the volume lable is not in the first 
+  a single Volume where the volume label is not in the first 
   tape block, so the tape is not recognized.
-
-Other Changes since 1.32d
 - Restore directory tree automatically selects all higher level
   directories to be restored.
 - Implement conio.c to use in console program -- mini-readline.
index 96fdfa9e356f02ca6bfe25f6739f255e2c2dca6a..d294713455c8c60e1d1c19570f89018516013d56 100644 (file)
@@ -1606,6 +1606,9 @@ AC_OUTPUT([autoconf/Make.common \
           src/cats/drop_bacula_database \
           src/findlib/Makefile \
           src/tools/Makefile \
+          src/win32/winbacula.nsi \
+          src/win32/bacula-fd.conf \
+          src/win32/Makefile \
           $PFILES ],  
          [(echo "Doing make of dependencies"; make depend;) ]
 )
index 8e657a1530babe27643657b23fceb3433483e418..7a54c6d50513b420f13e38bd717b2e48ad2fe6ee 100755 (executable)
@@ -18039,7 +18039,7 @@ if test "x${subsysdir}" = "x${sbindir}" ; then
    exit 1
 fi
 
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ac_config_files="$ac_config_files autoconf/Make.common Makefile rescue/Makefile rescue/linux/Makefile rescue/freebsd/Makefile rescue/solaris/Makefile scripts/startmysql scripts/stopmysql scripts/btraceback scripts/startit scripts/stopit scripts/bconsole scripts/gconsole scripts/bacula scripts/devel_bacula scripts/fd scripts/Makefile scripts/logrotate scripts/bacula.desktop.gnome1 scripts/bacula.desktop.gnome2 scripts/mtx-changer doc/Makefile src/Makefile src/host.h src/console/Makefile src/console/bconsole.conf src/gnome-console/Makefile src/gnome-console/gnome-console.conf src/gnome2-console/Makefile src/gnome2-console/gnome-console.conf src/tconsole/Makefile src/dird/Makefile src/dird/bacula-dir.conf src/lib/Makefile src/stored/Makefile src/stored/bacula-sd.conf src/filed/Makefile src/filed/bacula-fd.conf src/filed/win32/Makefile src/cats/Makefile src/cats/make_catalog_backup src/cats/delete_catalog_backup src/cats/create_postgresql_database src/cats/update_postgresql_tables src/cats/make_postgresql_tables src/cats/grant_postgresql_privileges src/cats/drop_postgresql_tables src/cats/drop_postgresql_database src/cats/create_mysql_database src/cats/update_mysql_tables src/cats/make_mysql_tables src/cats/grant_mysql_privileges src/cats/drop_mysql_tables src/cats/drop_mysql_database src/cats/create_sqlite_database src/cats/update_sqlite_tables src/cats/make_sqlite_tables src/cats/grant_sqlite_privileges src/cats/drop_sqlite_tables src/cats/drop_sqlite_database src/cats/sqlite src/cats/mysql src/cats/create_bdb_database src/cats/update_bdb_tables src/cats/make_bdb_tables src/cats/grant_bdb_privileges src/cats/drop_bdb_tables src/cats/drop_bdb_database src/cats/create_bacula_database src/cats/update_bacula_tables src/cats/grant_bacula_privileges src/cats/make_bacula_tables src/cats/drop_bacula_tables src/cats/drop_bacula_database src/findlib/Makefile src/tools/Makefile $PFILES"
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ac_config_files="$ac_config_files autoconf/Make.common Makefile rescue/Makefile rescue/linux/Makefile rescue/freebsd/Makefile rescue/solaris/Makefile scripts/startmysql scripts/stopmysql scripts/btraceback scripts/startit scripts/stopit scripts/bconsole scripts/gconsole scripts/bacula scripts/devel_bacula scripts/fd scripts/Makefile scripts/logrotate scripts/bacula.desktop.gnome1 scripts/bacula.desktop.gnome2 scripts/mtx-changer doc/Makefile src/Makefile src/host.h src/console/Makefile src/console/bconsole.conf src/gnome-console/Makefile src/gnome-console/gnome-console.conf src/gnome2-console/Makefile src/gnome2-console/gnome-console.conf src/tconsole/Makefile src/dird/Makefile src/dird/bacula-dir.conf src/lib/Makefile src/stored/Makefile src/stored/bacula-sd.conf src/filed/Makefile src/filed/bacula-fd.conf src/filed/win32/Makefile src/cats/Makefile src/cats/make_catalog_backup src/cats/delete_catalog_backup src/cats/create_postgresql_database src/cats/update_postgresql_tables src/cats/make_postgresql_tables src/cats/grant_postgresql_privileges src/cats/drop_postgresql_tables src/cats/drop_postgresql_database src/cats/create_mysql_database src/cats/update_mysql_tables src/cats/make_mysql_tables src/cats/grant_mysql_privileges src/cats/drop_mysql_tables src/cats/drop_mysql_database src/cats/create_sqlite_database src/cats/update_sqlite_tables src/cats/make_sqlite_tables src/cats/grant_sqlite_privileges src/cats/drop_sqlite_tables src/cats/drop_sqlite_database src/cats/sqlite src/cats/mysql src/cats/create_bdb_database src/cats/update_bdb_tables src/cats/make_bdb_tables src/cats/grant_bdb_privileges src/cats/drop_bdb_tables src/cats/drop_bdb_database src/cats/create_bacula_database src/cats/update_bacula_tables src/cats/grant_bacula_privileges src/cats/make_bacula_tables src/cats/drop_bacula_tables src/cats/drop_bacula_database src/findlib/Makefile src/tools/Makefile src/win32/winbacula.nsi src/win32/bacula-fd.conf src/win32/Makefile $PFILES"
           ac_config_commands="$ac_config_commands default"
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -18644,6 +18644,9 @@ do
   "src/cats/drop_bacula_database" ) CONFIG_FILES="$CONFIG_FILES src/cats/drop_bacula_database" ;;
   "src/findlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/findlib/Makefile" ;;
   "src/tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/tools/Makefile" ;;
+  "src/win32/winbacula.nsi" ) CONFIG_FILES="$CONFIG_FILES src/win32/winbacula.nsi" ;;
+  "src/win32/bacula-fd.conf" ) CONFIG_FILES="$CONFIG_FILES src/win32/bacula-fd.conf" ;;
+  "src/win32/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/win32/Makefile" ;;
   "$PFILES" ) CONFIG_FILES="$CONFIG_FILES $PFILES" ;;
   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
   "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:autoconf/config.h.in" ;;
index 41f8387397d44ea58fa2537669fe3c7e737ddb5b..2977974a0fa423ec7db92033e292582bfac119bb 100644 (file)
@@ -74,11 +74,9 @@ For 1.33 Testing/Documentation:
 For 1.33
 - Complete Win32 installer
 - Finish work on Gnome restore GUI.
-- Fix query buffer clobber ua_query.c
 - On unknown client in restore "client=xxx"
   Could not find Client "Matou": ERR=Query failed: DROP TABLE temp1: 
      ERR=no such table: temp1
-- Allow "delete job jobid=xx jobid=xxx".   
 - Implement multiple Volume in "purge jobs volume=".
 - Fix "llist jobid=xx" where no fileset or client exists.
 - Build console in client-only build.
@@ -1419,3 +1417,6 @@ Block Position: 0
 - Estimate to Tibs never returns.
 - Symbolic link a directory to another one, then backup the symbolic link.
 - Check and possibly fix problems with hard links.
+- Fix query buffer clobber ua_query.c
+- Allow "delete job jobid=xx jobid=xxx".   
+
index 02981b9b92cc71fccc659121112276faf31bde04..9594f74108309497cfff78e011fce6c1999fde64 100644 (file)
@@ -320,17 +320,12 @@ int db_get_job_volume_names(JCR *jcr, B_DB *mdb, uint32_t JobId, POOLMEM **Volum
    int i;
 
    db_lock(mdb);
-#ifdef HAVE_POSTGRESQL
+   /* Get one entry per VolumeName, but "sort" by VolIndex */
    Mmsg(&mdb->cmd, 
-        "SELECT DISTINCT VolumeName FROM JobMedia,Media WHERE "
-        "JobMedia.JobId=%u AND JobMedia.MediaId=Media.MediaId ", JobId);
-#else
-   Mmsg(&mdb->cmd, 
-        "SELECT VolumeName,VolIndex FROM JobMedia,Media WHERE "
+        "SELECT VolumeName,MAX(VolIndex) FROM JobMedia,Media WHERE "
         "JobMedia.JobId=%u AND JobMedia.MediaId=Media.MediaId "
         "GROUP BY VolumeName "
-        "ORDER BY VolIndex", JobId);
-#endif
+        "ORDER BY 2 ASC", JobId);
 
    Dmsg1(130, "VolNam=%s\n", mdb->cmd);
    *VolumeNames[0] = 0;
index 18d546bf31ce553a6822c0fe0204c2b574e4efa7..b17df2582d85c0680cfc1a72c8f6d83051e97092 100644 (file)
@@ -1503,7 +1503,8 @@ static int reload_cmd(UAContext *ua, char *cmd)
  * Delete Pool records (should purge Media with it).
  *
  *  delete pool=<pool-name>
- *  delete media pool=<pool-name> volume=<name>
+ *  delete volume pool=<pool-name> volume=<name>
+ *  delete job jobid=xxx
  */
 static int delete_cmd(UAContext *ua, char *cmd)
 {
@@ -1517,8 +1518,7 @@ static int delete_cmd(UAContext *ua, char *cmd)
       return 1;
    }
 
-     
-   switch (find_arg_keyword(ua, keywords)) {
+   switch (find_arg_keyword(ua, keywords)) {     
    case 0:
       delete_volume(ua);     
       return 1;
@@ -1526,7 +1526,11 @@ static int delete_cmd(UAContext *ua, char *cmd)
       delete_pool(ua);
       return 1;
    case 2:
-      delete_job(ua);
+      int i;
+      while ((i=find_arg(ua, _("jobid"))) > 0) {
+        delete_job(ua);
+        *ua->argk[i] = 0;         /* zap keyword already visited */
+      }
       return 1;
    default:
       break;
@@ -1558,7 +1562,7 @@ static int delete_job(UAContext *ua)
    POOLMEM *query = get_pool_memory(PM_MESSAGE);
    JobId_t JobId;
 
-   int i = find_arg_with_value(ua, "jobid");
+   int i = find_arg_with_value(ua, _("jobid"));
    if (i >= 0) {
       JobId = str_to_int64(ua->argv[i]);
    } else if (!get_pint(ua, _("Enter JobId to delete: "))) {
index 569a5f7b76fc16c8eccbf7cb3f7506c29d320ac3..3cba6c85573973d814a06f6ab4511687beb2eed7 100644 (file)
@@ -163,6 +163,7 @@ static int file_delete_handler(void *ctx, int num_fields, char **row)
  */
 int purgecmd(UAContext *ua, char *cmd)
 {
+   int i;
    CLIENT *client;
    MEDIA_DBR mr;
    JOB_DBR  jr;
@@ -234,8 +235,12 @@ int purgecmd(UAContext *ua, char *cmd)
       }
    /* Volume */
    case 2:
-      if (select_media_dbr(ua, &mr)) {
-        purge_jobs_from_volume(ua, &mr);
+      while ((i=find_arg(ua, _("volume"))) >= 0) {
+        if (select_media_dbr(ua, &mr)) {
+           purge_jobs_from_volume(ua, &mr);
+        }
+        *ua->argk[i] = 0;            /* zap keyword already seen */
+         bsendmsg(ua, "\n");
       }
       return 1;
    default:
index dcd802531d6ed94386023e9629552464da199e22..970ef5ab52f43cc845c407a39a504e9f1b5c40a9 100644 (file)
@@ -172,16 +172,15 @@ static POOLMEM *substitute_prompts(UAContext *ua,
    for (i=0; i<9; i++) {
       subst[i] = NULL;
    }
-   /* ****FIXME**** second and third check_pool ... below are probably broken */
-   new_query = get_memory(2000);
-   new_query = check_pool_memory_size(new_query, strlen(query) +100);
+   new_query = get_pool_memory(PM_FNAME);
    o = new_query;
-   olen = 0;
    for (q=query; (p=strchr(q, '%')); ) {
       if (p) {
+       olen = o - new_query;
+       new_query = check_pool_memory_size(new_query, olen + p - q + 10);
+       o = new_query + olen;
         while (q < p) {              /* copy up to % */
            *o++ = *q++;
-           olen++;
         }
         p++;
         switch (*p) {
@@ -206,10 +205,11 @@ static POOLMEM *substitute_prompts(UAContext *ua,
               p = (char *)malloc(len * 2 + 1);
               db_escape_string(p, ua->cmd, len);
               subst[n] = p;
-              new_query = check_pool_memory_size(new_query, olen + strlen(p) + 1);
+              olen = o - new_query;
+              new_query = check_pool_memory_size(new_query, olen + strlen(p) + 10);
+              o = new_query + olen;
               while (*p) {
                  *o++ = *p++;
-                 olen++;
               }
            } else {
                bsendmsg(ua, _("Warning prompt %d missing.\n"), n+1);
@@ -218,18 +218,18 @@ static POOLMEM *substitute_prompts(UAContext *ua,
            break;
          case '%':
             *o++ = '%';
-           olen++;
            q += 2;
            break;
         default:
             *o++ = '%';
-           olen++;
            q++;
            break;
         }
       }
    }
-   new_query = check_pool_memory_size(new_query, olen + strlen(q) + 1);
+   olen = o - new_query;
+   new_query = check_pool_memory_size(new_query, olen + strlen(q) + 10);
+   o = new_query + olen;
    while (*q) {
       *o++ = *q++;
    }
index 751b6bb7eb3e97ac930a183bfb65d796496515dd..6aa15024b9fdbae4ec032e2bbc46a3847a593da5 100644 (file)
@@ -1,9 +1,9 @@
 /* */
 #undef  VERSION
-#define VERSION "1.33.4"
+#define VERSION "1.33.5"
 #define VSTRING "1"
-#define BDATE   "23 Mar 2004"
-#define LSMDATE "23Mar04"
+#define BDATE   "24 Mar 2004"
+#define LSMDATE "24Mar04"
 
 /* Debug flags */
 #undef  DEBUG
index ab50bb552fca53472b222191f091c2667506d6fe..736d1838a7259cfe4ec004a0fee49b7aaeae840d 100755 (executable)
 ; winbacula.nsi
 ;
-; written by Michel Meyers (michel@tcnnet.dyndns.org)
+; Written by Michel Meyers (michel@tcnnet.dyndns.org)
 ;
-; ChangeLog
-; v0.1 - initial release (still a lot to do)
+; Updated by Kern Sibbald for native Win32 Bacula
+;
+; Command line options:
+;
+; /cygwin     -  do cygwin install into c:\cygwin\bacula
+; /service    - 
+; /start
 
-;!define TEMP1 $R0 ;Temp variable
-!define VERSION '@VERSION@-@LSMDATE@'
+!define PRODUCT "Bacula"
+!define VERSION "@VERSION@"
 
-SetCompressor lzma
-SetCompressorDictSize 32
+;                           
+; Include the Modern UI
+;
+!include "MUI.nsh"
+!include "params.nsh"
+!include "util.nsh"
 
-; The name of the installer
-Name "Bacula Client"
+;
+; Basics
+;
+  Name "Bacula Client"
+  OutFile "winbacula-${VERSION}.exe"
+  InstallDir "c:\bacula"
 
-; The file to write
-OutFile "winbacula-${VERSION}.exe"
+;
+; Pull in pages
+;
+ !insertmacro MUI_PAGE_WELCOME
+;  !insertmacro MUI_PAGE_LICENSE "License.txt"
+ !insertmacro MUI_PAGE_COMPONENTS
+ !insertmacro MUI_PAGE_DIRECTORY
+ !insertmacro MUI_PAGE_INSTFILES
+ !insertmacro MUI_PAGE_FINISH
 
-; The default installation directory
-InstallDir "c:\bacula"
+ !insertmacro MUI_UNPAGE_WELCOME
+ !insertmacro MUI_UNPAGE_CONFIRM
+ !insertmacro MUI_UNPAGE_INSTFILES
+ !insertmacro MUI_UNPAGE_FINISH
 
-DirText "Setup will install the Bacula Client v${VERSION} to the directory specified below. To install in a different folder, click Browse and select another folder.$\n$\nNote to CYGWIN users: please choose your CYGWIN root directory."
-Page directory
-Page instfiles
-UninstPage uninstConfirm
-UninstPage instfiles
-
-;Icon "${NSISDIR}\Contrib\Icons\modern-install.ico"
-;UninstallIcon "${NSISDIR}\Contrib\Icons\modern-uninstall.ico"
-;CheckBitmap "${NSISDIR}\Contrib\Icons\modern.bmp"
-
-; The text to prompt the user to enter a directory
-;ComponentText "This will extract the temporary files needed for controlling your PC remotely."
-; The stuff to install
-
-; -- written by Alexis de Valence --
-; GetONEParameter
-
-; Usage:
-;   Push 3                 ; to get the 3rd parameter of the command line
-;   Call GetONEParameter
-;   Pop $R0                ; saves the result in $R0
-; returns an empty string if not found
-
-Function GetONEParameter
-   Exch $R0
-   Push $R1
-   Push $R2
-   Push $R3
-   Push $R4
-   Push $R5
-   Push $R6
-
-; init variables
-   IntOp $R5 $R0 + 1
-   StrCpy $R2 0
-   StrCpy $R4 1
-   StrCpy $R6 0
-
-   loop3: ; looking for a char that's not a space
-     IntOp $R2 $R2 + 1
-     StrCpy $R0 $CMDLINE 1 $R2
-     StrCmp $R0 " " loop3
-     StrCpy $R3 $R2   ; found the begining of the current parameter
-
-
-   loop:          ; scanning for the end of the current parameter
-
-     StrCpy $R0 $CMDLINE 1 $R2
-     StrCmp $R0 " " loop2
-     StrCmp $R0 "" last
-     IntOp $R2 $R2 + 1
-     Goto loop
-
-   last: ; there will be no other parameter to extract
-   StrCpy $R6 1
-
-   loop2: ; found the end of the current parameter
-
-   IntCmp $R4 $R5 0 NextParam end
-   StrCpy $R6 1 ; to quit after this process
-
-   IntOp $R1 $R2 - $R3 ;number of letter of current parameter
-   StrCpy $R0 $CMDLINE $R1 $R3        ; stores the result in R0
-
-   NextParam:
-   IntCmp $R6 1 end ; leave if found or if not enough parameters
-
-   ; process the next parameter
-   IntOp $R4 $R4 + 1
-
-   Goto loop3
-
-   end:
-
-   Pop $R6  ; restore R0 - R6 to their initial value
-   Pop $R5
-   Pop $R4
-   Pop $R3
-   Pop $R2
-   Pop $R1
-
-   Exch $R0    ;Puts the result on the stack
-
- FunctionEnd
-
-; -- written by Michel Meyers --
-; ParameterGiven - checks first 9 parameters on the command line
-; Usage:
-;   Push "/parameter"                 ; to check command line for /parameter
-;   Call ParameterGiven
-;   Pop $R0                ; saves the result in $R0 (result = true or false)
-
- Function ParameterGiven
-   Exch $R0
-   Push $R1
-   Push $R2
-   Push $R3
-   
-   StrCpy $R1 0
-   StrCpy $R3 0
-   loopme:
-   StrCmp $R1 9 AllChecked
-   IntOp $R1 $R1 + 1
-   Push $R1
-   Call GetONEParameter
-   Pop $R2                ; saves the result in $R2
-   StrCmp $R0 $R2 Found
-   Goto loopme
-   
-   Found:
-   StrCpy $R3 1
-   Goto loopme
-   
-   AllChecked:
-   Exch $R3
-  
- FunctionEnd
 
-Section "Install"
+ !define      MUI_ABORTWARNING
+
+ !insertmacro MUI_LANGUAGE "English"
+
+
+
+DirText "Setup will install the Bacula Client ${VERSION} to the directory specified below. To install in a different folder, click Browse and select another folder.$\n$\nNote to CYGWIN users: please choose your CYGWIN root directory."
+
 
+Section "Bacula File Service" SecService
+  ;
   ; /cygwin on command line forces install dir to c:\cygwin\bacula (useful for silent install)
+  ;
   Push "/cygwin"
   Call ParameterGiven
   Pop $6
   StrCmp $6 0 NoCygwin
   StrCpy $INSTDIR "c:\cygwin\bacula"
-  NoCygwin:
+ NoCygwin:
+; IfFileExists "c:\cygwin" Cygwin ReallyNoCygwin
+;Cygwin:
+; StrCpy $INSTDIR "c:\cygwin\bacula"
+;ReallyNoCygwin:
 
   ; Check for existing installation
   StrCpy $7 0
   IfFileExists "$INSTDIR\bin\bacula-fd.conf" Upgrade NoUpgrade
 Upgrade:
+ Upgrade:
     StrCpy $7 1
     ; Shutdown any baculas that could be running
     ExecWait '"$INSTDIR\bin\bacula-fd.exe" /kill'
-  NoUpgrade:
+    ; give it some time to shutdown
+    Sleep 1000
+ NoUpgrade:
 
   ; Set output path to the installation directory.
   SetOutPath "$INSTDIR\bin"
@@ -166,15 +87,16 @@ Section "Install"
   ; Put files there
   File baculafd\Release\bacula-fd.exe
   File pthreads\pthreadVCE.dll
-  IfFileExists "$INSTDIR\bacula-fd.conf" newconf 
+  File License.txt
+  IfFileExists "$INSTDIR\bin\bacula-fd.conf" newconf 
   File bacula-fd.conf
   goto do_service
 newconf:
+ newconf:
   File /oname=bacula-fd.conf.new bacula-fd.conf
        
 
   ; If /service was given jump to the service install part
 do_service:
+ do_service:
   Push "/service"
   Call ParameterGiven
   Pop $5
@@ -189,25 +111,23 @@ Section "Install"
 
   ; Install as service?
   MessageBox MB_YESNO|MB_ICONQUESTION "Do you want to install the Bacula Client as a service (automatically starts with your PC)?" IDNO NoService
 Service:
+ Service:
     ExecWait '"$INSTDIR\bin\bacula-fd.exe" /install'
     StrCpy $9 "1"
     WriteRegDWORD HKLM "Software\Bacula" "InstalledService" "1"
 NoService:
+ NoService:
 
   ; Write the uninstall keys for Windows
   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "DisplayName" "Bacula Client"
   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bacula" "UninstallString" '"$INSTDIR\uninstall.exe"'
-  SetOutPath "$INSTDIR"
-  WriteUninstaller "uninstall.exe"
+  WriteUninstaller "$INSTDIR\Uninstall.exe"
 
   ; Create bacula-fd.conf and have the user edit it (skipped if silent)
   IfSilent NoReminder
   StrCmp $7 "1" NoReminder  ; skip if it is an upgrade
   MessageBox MB_OK "Please edit $INSTDIR\bin\bacula-fd.conf according to your requirements/installation! Also remember to put a shortcut into your start menu if you didn't install the client as a service."
-  CopyFiles /SILENT "$INSTDIR\bin\bacula-fd.conf.new" "$INSTDIR\bin\bacula-fd.conf"
   Exec 'write "$INSTDIR\bin\bacula-fd.conf"'  ; spawn wordpad with the file to be edited
 NoReminder:
+ NoReminder:
 
   ; Start the client? (default skipped if silent, use /start to force starting)
   Push "/start"
@@ -215,21 +135,45 @@ Section "Install"
   Pop $8
   StrCmp $8 "1" Start
   IfSilent NoStart
+  Call IsNt
+  Pop $R0
+  StrCmp $R0 "false" do_win98
+  MessageBox MB_YESNO|MB_ICONQUESTION  "Would you like to start the Bacula Client now?" IDNO NoStart
+  Exec 'net start bacula'
+  goto NoStart 
+ do_win98:
   MessageBox MB_YESNO|MB_ICONQUESTION  "Would you like to start the Bacula Client now?" IDNO NoStart
 Start:
-    Exec '"$INSTDIR\bin\bacula-fd.exe" -c "$INSTDIR\bin\bacula-fd.conf"'
 NoStart:
+ Start:
+  Exec '"$INSTDIR\bin\bacula-fd.exe" -c "$INSTDIR\bin\bacula-fd.conf"'
+ NoStart:
 
 SectionEnd
 
 
+Section "Install Documentation" SecDoc
+SectionEnd
+
+;
+; Extra Page descriptions
+;
+
+  LangString DESC_SecService ${LANG_ENGLISH} "Install Bacula client on this system."
+  LangString DESC_SecDoc ${LANG_ENGLISH} "Install Documenation (not implemented)."
+
+  !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+    !insertmacro MUI_DESCRIPTION_TEXT ${SecService} $(DESC_SecService)
+    !insertmacro MUI_DESCRIPTION_TEXT ${SecDoc} $(DESC_SecDoc)
+  !insertmacro MUI_FUNCTION_DESCRIPTION_END
+
+
+
 ; Uninstall section
 
 UninstallText "This will uninstall the Bacula Client. Hit next to continue."
 
 Section "Uninstall"
-  
-  ; Shutdown any baculas that could be running
+
+  ; Shutdown any baculum that could be running
   ExecWait '"$INSTDIR\bin\bacula-fd.exe" /kill'
 
   ReadRegDWORD $9 HKLM "Software\Bacula" "InstalledService"
@@ -247,7 +191,7 @@ Section "Uninstall"
   Delete /REBOOTOK "$INSTDIR\bin\*.*"
   CopyFiles /SILENT "$INSTDIR\bacula-fd.conf" "$INSTDIR\bin\bacula-fd.conf"
   Delete /REBOOTOK "$INSTDIR\bacula-fd.conf"
-  Delete /REBOOTOK "$INSTDIR\uninstall.exe"
+  Delete /REBOOTOK "$INSTDIR\Uninstall.exe"
 
   ; Check for existing installation
   MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to delete the current configuration file ($INSTDIR\bin\bacula-fd.conf)?" IDNO LeaveConfig
@@ -261,10 +205,10 @@ Section "Uninstall"
   
   ; If we need to reboot we'll ask
   IfRebootFlag Reboot Continue
 Reboot:
+ Reboot:
   MessageBox MB_YESNO|MB_ICONQUESTION "Some files will only be deleted after restarting. Reboot now?" IDNO Continue
     Reboot
 Continue:
+ Continue:
 
 SectionEnd