mt. This fixes bug #1116.
kes Add const in python files to reduce compiler warnings.
This may have to be backed out because of later compiler
strict checking.
kes Fix failure of 2drive-concurrent-test. Always read label;
clear_unload() only after drive is defined in acquire_for_read().
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7289
91ce42f0-d328-0410-95d8-
f526ca767f89
# Note Debian has a different mt than the standard Linux version.
# When no tape is in the drive it waits 2 minutes.
# When a tape is in the drive, it prints user unfriendly output.
+# Note, with Ubuntu Gusty (8.04), there are two versions of mt,
+# so we attempt to figure out which one.
#
OS=`uname`
ready="Current Driver State: at rest."
;;
Linux)
- if test -e /etc/debian_version ; then
- ready="drive status"
- else
- ready="ONLINE"
+ ready="ONLINE"
+ if test -f /etc/debian_version ; then
+ mt --version|grep "mt-st"
+ if test $? -eq 1 ; then
+ ready="drive status"
+ fi
fi
;;
esac
${MTX} -f $ctl status >${TMPFILE}
rtn=$?
cat ${TMPFILE} | grep " Storage Element [0-9]*:.*Full" | awk "{print \$3 \$4}" | sed "s/Full *\(:VolumeTag=\)*//"
-
-# If you want/can use IMPORT/EXPORT slots as normal slots within bacula
-# replace the previous line by this one
-# sed "s/ IMPORT\/EXPORT//" "${TMPFILE}" | grep " Storage Element [0-9]*:.*Full" | awk "{print \$3 \$4}" | sed "s/Full *\(:VolumeTag=\)*//"
#
# If you have a VXA PacketLoader and the above does not work, try
# turning it off and enabling the following line.
struct s_vars {
const char *name;
- char *fmt;
+ const char *fmt;
};
/* Read-only variables */
struct s_vars {
const char *name;
- char *fmt;
+ const char *fmt;
};
/* Read-only variables */
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2004-2007 Free Software Foundation Europe e.V.
+ Copyright (C) 2004-2008 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.
dev->num_writers, jcr->JobId);
goto get_out;
}
- dev->clear_unload();
/* Find next Volume, if any */
vol = jcr->VolList;
}
}
+ dev->clear_unload();
+
if (reserve_volume(dcr, dcr->VolumeName) == NULL) {
Dmsg2(100, "Could not reserve volume %s on %s\n", dcr->VolumeName,
dcr->dev->print_name());
return VOL_IO_ERROR;
}
}
+#ifdef xxx
if (dev->is_labeled()) { /* did we already read label? */
/* Compare Volume Names allow special wild card */
if (VolName && *VolName && *VolName != '*' && strcmp(dev->VolHdr.VolumeName, VolName) != 0) {
Dmsg0(130, "Leave read_volume_label() VOL_OK\n");
return VOL_OK; /* label already read */
}
+#endif
dev->clear_labeled();
dev->clear_append();
-/*
- *
- * Bacula interface to Python for the Storage Daemon
- *
- * Kern Sibbald, January MMV
- *
- * Version $Id$
- *
- */
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2005-2006 Free Software Foundation Europe e.V.
+ Copyright (C) 2005-2008 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.
(FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
Switzerland, email:ftf@fsfeurope.org.
*/
+/*
+ *
+ * Bacula interface to Python for the Storage Daemon
+ *
+ * Kern Sibbald, January MMV
+ *
+ * Version $Id$
+ *
+ */
#include "bacula.h"
struct s_vars {
const char *name;
- char *fmt;
+ const char *fmt;
};
static struct s_vars getvars[] = {
#undef VERSION
#define VERSION "2.5.1"
-#define BDATE "27 June 2008"
-#define LSMDATE "27Jun08"
+#define BDATE "02 July 2008"
+#define LSMDATE "02Jul08"
#define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n"
#define BYEAR "2008" /* year for copyright messages in progs */
General:
+02Jul08
+kes Fix mtx-changer to detect both versions of Ubuntu (Debian)
+ mt. This fixes bug #1116.
+kes Add const in python files to reduce compiler warnings.
+ This may have to be backed out because of later compiler
+ strict checking.
+kes Fix failure of 2drive-concurrent-test. Always read label;
+ clear_unload() only after drive is defined in acquire_for_read().
27Jun08
kes Generally clean up the manual tape loading code. The main
conceptial change is that when a volume is marked to be unloaded,