]> git.sur5r.net Git - bacula/bacula/commitdiff
Update doc and authentication error message
authorKern Sibbald <kern@sibbald.com>
Mon, 22 Nov 2004 09:25:19 +0000 (09:25 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 22 Nov 2004 09:25:19 +0000 (09:25 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1716 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/patches/fix_postgresql_tables [new file with mode: 0755]
bacula/src/cats/fix_postgresql_tables [new file with mode: 0755]
bacula/src/dird/authenticate.c
bacula/src/stored/autochanger.c

diff --git a/bacula/patches/fix_postgresql_tables b/bacula/patches/fix_postgresql_tables
new file mode 100755 (executable)
index 0000000..4d835df
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# Shell script to fix PostgreSQL tables in version 8
+#
+echo " "
+echo "This script will fix a Bacula PostgreSQL database version 8"
+echo "Depending on the size of your database,"
+echo "this script may take several minutes to run."
+echo " "
+#
+# Set the following to the path to psql.
+bindir=****EDIT-ME to be the path to psql****
+
+if $bindir/psql $* -f - <<END-OF-DATA
+\c bacula
+
+alter table media alter column endblock rename to endblock-old;
+alter table media add column endblock bigint;
+update media set endblock = endblock-old;
+alter table media alter column endblock set not null;
+alter table media drop column endblock-old;
+
+vacuum;
+
+END-OF-DATA
+then
+   echo "Update of Bacula PostgreSQL tables succeeded."
+else
+   echo "Update of Bacula PostgreSQL tables failed."
+fi
+exit 0
diff --git a/bacula/src/cats/fix_postgresql_tables b/bacula/src/cats/fix_postgresql_tables
new file mode 100755 (executable)
index 0000000..4d835df
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# Shell script to fix PostgreSQL tables in version 8
+#
+echo " "
+echo "This script will fix a Bacula PostgreSQL database version 8"
+echo "Depending on the size of your database,"
+echo "this script may take several minutes to run."
+echo " "
+#
+# Set the following to the path to psql.
+bindir=****EDIT-ME to be the path to psql****
+
+if $bindir/psql $* -f - <<END-OF-DATA
+\c bacula
+
+alter table media alter column endblock rename to endblock-old;
+alter table media add column endblock bigint;
+update media set endblock = endblock-old;
+alter table media alter column endblock set not null;
+alter table media drop column endblock-old;
+
+vacuum;
+
+END-OF-DATA
+then
+   echo "Update of Bacula PostgreSQL tables succeeded."
+else
+   echo "Update of Bacula PostgreSQL tables failed."
+fi
+exit 0
index 733177f1fee6e1dfe5908090d52235a8d4def135..b889e5e8b9ab50f923cde27e155bd118901b961a 100644 (file)
@@ -84,8 +84,10 @@ bool authenticate_storage_daemon(JCR *jcr, STORE *store)
    if (!get_auth || !auth) {
       stop_bsock_timer(tid);
       Dmsg0(50, _("Director and Storage daemon passwords or names not the same.\n"));
-      Jmsg0(jcr, M_FATAL, 0, _("Director and Storage daemon passwords or names not the same.\n"   
-       "Please see http://www.bacula.org/html-manual/faq.html#AuthorizationErrors for help.\n"));
+      Jmsg0(jcr, M_FATAL, 0,
+            _("Director and Storage daemon passwords or names not the same or\n"
+            "you have exceeded the Maximum Concurrent Jobs on the SD.\n"
+            "Please see http://www.bacula.org/html-manual/faq.html#AuthorizationErrors for help.\n"));
       return 0;
    }
    Dmsg1(116, ">stored: %s", sd->msg);
@@ -139,8 +141,10 @@ int authenticate_file_daemon(JCR *jcr)
    if (!get_auth || !auth) {
       stop_bsock_timer(tid);
       Dmsg0(50, _("Director and File daemon passwords or names not the same.\n"));
-      Jmsg(jcr, M_FATAL, 0, _("Director and File daemon passwords or names not the same.\n"   
-       "Please see http://www.bacula.org/html-manual/faq.html#AuthorizationErrors for help.\n"));
+      Jmsg(jcr, M_FATAL, 0,
+           _("Director and File daemon passwords or names not the same or\n"   
+            "you have exceeded the Maximum Concurrent Jobs on the FD.\n"
+            "Please see http://www.bacula.org/html-manual/faq.html#AuthorizationErrors for help.\n"));
       return 0;
    }
    Dmsg1(116, ">filed: %s", fd->msg);
index b9ef352b31f24478f40e34a1320cdcd981b61a3e..4c4aa2f90bf9abb027c5aa674c9d5d6bf062b985 100644 (file)
@@ -52,10 +52,11 @@ int autoload_device(DCR *dcr, int writing, BSOCK *dir)
 {
    JCR *jcr = dcr->jcr;
    DEVICE *dev = dcr->dev;
-   int slot = dcr->VolCatInfo.Slot;
+   int slot;
    int drive = jcr->device->drive_index;
    int rtn_stat = -1;                /* error status */
      
+   slot = dcr->VolCatInfo.InChanger ? dcr->VolCatInfo.Slot : 0;
    /*
     * Handle autoloaders here. If we cannot autoload it, we
     *  will return FALSE to ask the sysop.
@@ -65,7 +66,7 @@ int autoload_device(DCR *dcr, int writing, BSOCK *dir)
         return 0;                    /* For user, bail out right now */
       }
       if (dir_find_next_appendable_volume(dcr)) {
-        slot = dcr->VolCatInfo.Slot; 
+        slot = dcr->VolCatInfo.InChanger ? dcr->VolCatInfo.Slot : 0;
       } else {
         slot = 0;
       }