]> git.sur5r.net Git - bacula/bacula/commitdiff
Some Win32 fixes
authorKern Sibbald <kern@sibbald.com>
Sun, 18 Jul 2004 09:23:42 +0000 (09:23 +0000)
committerKern Sibbald <kern@sibbald.com>
Sun, 18 Jul 2004 09:23:42 +0000 (09:23 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1480 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/autoconf/configure.in
bacula/configure
bacula/kernstodo
bacula/scripts/mtx-changer.in
bacula/src/dird/job.c
bacula/src/dird/protos.h
bacula/src/dird/ua_restore.c
bacula/src/dird/ua_run.c
bacula/src/findlib/find.c
bacula/src/version.h

index 35b024b28b9fa8e791fab00c78977f20ed23d3df..fff33f7ac109d64ef5e7e5095ee09148c527e05c 100644 (file)
@@ -1625,7 +1625,6 @@ AC_OUTPUT([autoconf/Make.common \
           scripts/gconsole \
           scripts/bacula \
           scripts/devel_bacula \
-          scripts/fd \
           scripts/Makefile \
           scripts/logrotate \
           scripts/bacula.desktop.gnome1 \
index 4bf687d9dba62d628905e665854056af0261e80d..a355cebc110699650688f08d83b4c28bd1ab8e5a 100755 (executable)
@@ -18368,7 +18368,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/bacula.desktop.gnome1.consolehelper scripts/bacula.desktop.gnome2.consolehelper scripts/bacula.desktop.gnome1.xsu scripts/bacula.desktop.gnome2.xsu scripts/gnome-console.console_apps 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/wx-console/Makefile src/wx-console/wx-console.conf 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/baculafd/bacula-fd.conf src/win32/Makefile src/win32/console/bconsole.conf src/win32/wx-console/wx-console.conf $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/Makefile scripts/logrotate scripts/bacula.desktop.gnome1 scripts/bacula.desktop.gnome2 scripts/bacula.desktop.gnome1.consolehelper scripts/bacula.desktop.gnome2.consolehelper scripts/bacula.desktop.gnome1.xsu scripts/bacula.desktop.gnome2.xsu scripts/gnome-console.console_apps 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/wx-console/Makefile src/wx-console/wx-console.conf 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/baculafd/bacula-fd.conf src/win32/Makefile src/win32/console/bconsole.conf src/win32/wx-console/wx-console.conf $PFILES"
           ac_config_commands="$ac_config_commands default"
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -18912,7 +18912,6 @@ do
   "scripts/gconsole" ) CONFIG_FILES="$CONFIG_FILES scripts/gconsole" ;;
   "scripts/bacula" ) CONFIG_FILES="$CONFIG_FILES scripts/bacula" ;;
   "scripts/devel_bacula" ) CONFIG_FILES="$CONFIG_FILES scripts/devel_bacula" ;;
-  "scripts/fd" ) CONFIG_FILES="$CONFIG_FILES scripts/fd" ;;
   "scripts/Makefile" ) CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
   "scripts/logrotate" ) CONFIG_FILES="$CONFIG_FILES scripts/logrotate" ;;
   "scripts/bacula.desktop.gnome1" ) CONFIG_FILES="$CONFIG_FILES scripts/bacula.desktop.gnome1" ;;
index 254d5dcc3c90f60e41ae634d4e3afae8d058552d..2f7c3ee53c7bf230d3981c373ea9bc11a55b9bc1 100644 (file)
@@ -2,7 +2,7 @@
                    14 July 2004
 
 1.35 Items to do:
-- Make sure that all errors from libacl are printed.
+- Fix GROUP BYs in all SQL.
 - Add new DCR calling sequences everywhere in SD.
   This will permit simultaneous use of multiple 
   devices by a single job.
@@ -1100,3 +1100,4 @@ Block Position: 0
 - Add priority to Scheduled jobs status listing.
 - Look at Win32 inc problem when new directory added files not saved???
 - Require resource names to be unique.
+- Make sure that all errors from libacl are printed.
index e1c0d4a98bd6d53a07e8c54757d4aba1bddbbf79..e4fdee8ba6b4fd865b4e903db3df08dca91f1603 100644 (file)
@@ -38,6 +38,9 @@ MTX=@MTX@
 #   not running on Linux, you will probably need to
 #   re-write it.
 #
+# If you have a FreeBSD system, you might want to change
+#  the $(seq 180) to $(jot 180) -- tip from Brian McDonald
+#
 wait_for_drive() {
   for i in $(seq 180); do   # Wait max 180 seconds
     if mt -f $1 status >/dev/null 2>&1; then
index 0a21271352795978ccf59626f523a6bc482bf086..bbbefa8997e049899c29c5d712e3060a4b362ae5 100644 (file)
@@ -74,10 +74,14 @@ void init_job_server(int max_workers)
  * Run a job -- typically called by the scheduler, but may also
  *             be called by the UA (Console program).
  *
+ *  Returns: 0 on failure
+ *          JobId on success
+ *
  */
-void run_job(JCR *jcr)
+JobId_t run_job(JCR *jcr)
 {
    int stat, errstat;
+   JobId_t JobId = 0;
 
    P(jcr->mutex);
    sm_check(__FILE__, __LINE__, true);
@@ -117,7 +121,7 @@ void run_job(JCR *jcr)
       Jmsg(jcr, M_FATAL, 0, "%s", db_strerror(jcr->db));
       goto bail_out;
    }
-   jcr->JobId = jcr->jr.JobId;
+   JobId = jcr->JobId = jcr->jr.JobId;
 
    Dmsg4(100, "Created job record JobId=%d Name=%s Type=%c Level=%c\n", 
        jcr->JobId, jcr->Job, jcr->jr.JobType, jcr->jr.JobLevel);
@@ -126,17 +130,18 @@ void run_job(JCR *jcr)
    /* Queue the job to be run */
    if ((stat = jobq_add(&job_queue, jcr)) != 0) {
       Jmsg(jcr, M_FATAL, 0, _("Could not add job queue: ERR=%s\n"), strerror(stat));
+      JobId = 0;
       goto bail_out;
    }
    Dmsg0(100, "Done run_job()\n");
 
    V(jcr->mutex);
-   return;
+   return JobId;
 
 bail_out:
    set_jcr_job_status(jcr, JS_ErrorTerminated);
    V(jcr->mutex);
-   return;
+   return JobId;
 
 }
 
index 5dca711af4efa60a2a48603106900d0242ff9b72..ac61ca9935738b0b25a8221466a9c807f3a3f0ee 100644 (file)
@@ -87,7 +87,7 @@ extern void create_unique_job_name(JCR *jcr, const char *base_name);
 extern void update_job_end_record(JCR *jcr);
 extern bool get_or_create_client_record(JCR *jcr);
 extern bool get_or_create_fileset_record(JCR *jcr, FILESET_DBR *fsr);
-extern void run_job(JCR *jcr);
+extern JobId_t run_job(JCR *jcr);
 extern int cancel_job(UAContext *ua, JCR *jcr);
 extern void init_jcr_job_record(JCR *jcr);
 
index 8d5347dbc36071c066bb9d7c8c0264ae10cf7fd7..9c9faec58e6240fd36480cad993a1956398a82dc 100644 (file)
@@ -224,8 +224,6 @@ int restore_cmd(UAContext *ua, const char *cmd)
    Dmsg1(400, "Submitting: %s\n", ua->cmd);
    parse_ua_args(ua);
    run_cmd(ua, ua->cmd);
-
-   bsendmsg(ua, _("Restore command done.\n"));
    free_rx(&rx);
    return 1;
 
index 6fdd3478474202b50e6bc3c868f1e028481f0f85..4f02bf6648925d1a750f60d1c8887973b86b035c 100644 (file)
@@ -417,11 +417,7 @@ try_again:
 
    /* Run without prompting? */
    if (find_arg(ua, _("yes")) > 0) {
-      Dmsg1(200, "Calling run_job job=%x\n", jcr->job);
-      run_job(jcr);
-      free_jcr(jcr);                 /* release jcr */
-      bsendmsg(ua, _("Run command submitted.\n"));
-      return 1;
+      goto start_job;
    }
 
    /*  
@@ -797,10 +793,16 @@ Priority:   %d\n"),
    }
 
    if (strncasecmp(ua->cmd, _("yes"), strlen(ua->cmd)) == 0) {
+      JobId_t JobId;
       Dmsg1(200, "Calling run_job job=%x\n", jcr->job);
-      run_job(jcr);
+start_job:
+      JobId = run_job(jcr);
       free_jcr(jcr);                 /* release jcr */
-      bsendmsg(ua, _("Run command submitted.\n"));
+      if (JobId == 0) {
+         bsendmsg(ua, _("Job failed.\n"));
+      } else {
+         bsendmsg(ua, _("Job started. JobId=%u\n"), JobId);
+      }
       return 1;
    }
 
index f3d4ef93190a26dda469b8ed09bdc34073a3c168..0550e737867042422f919eec248b2939cff129e3 100644 (file)
@@ -169,6 +169,7 @@ static bool accept_file(FF_PKT *ff)
            return true;              /* accept file */
         }
       }
+#ifndef WIN32
       for (k=0; k<fo->regex.size(); k++) {
         const int nmatch = 30;
         regmatch_t pmatch[nmatch];
@@ -181,6 +182,7 @@ static bool accept_file(FF_PKT *ff)
            return true;              /* accept file */
         }
       }
+#endif
    }
 
    for (i=0; i<fileset->exclude_list.size(); i++) {
index fa475a3102266270bb1bc24a23bf9864f94a30f5..af92258e60c6c3d121e53de6044dd4886f7ea067 100644 (file)
@@ -2,8 +2,8 @@
 #undef  VERSION
 #define VERSION "1.35.1"
 #define VSTRING "1"
-#define BDATE   "16 July 2004"
-#define LSMDATE "16Jul04"
+#define BDATE   "17 July 2004"
+#define LSMDATE "17Jul04"
 
 /* Debug flags */
 #undef  DEBUG