aboutsummaryrefslogtreecommitdiff
path: root/sysutils/bacula-server/files
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/bacula-server/files')
-rw-r--r--sysutils/bacula-server/files/chio-bacula19
-rw-r--r--sysutils/bacula-server/files/patch-autoconf-Make.common.in10
-rw-r--r--sysutils/bacula-server/files/patch-src-dird-sql_cmds.c10
3 files changed, 17 insertions, 22 deletions
diff --git a/sysutils/bacula-server/files/chio-bacula b/sysutils/bacula-server/files/chio-bacula
index c3a4554a215a..a586cbd1e914 100644
--- a/sysutils/bacula-server/files/chio-bacula
+++ b/sysutils/bacula-server/files/chio-bacula
@@ -33,7 +33,7 @@ MTX=/bin/chio
# Set default values (see case statement below for
# free mapping of drive index and tape device
# We have a double drive Qualstar where drive 1 is the default bacula drive
-TAPE=/dev/nrsa1
+TAPE=/dev/nrsa0
DRIVE=0
# Time to wait for (un)loading
SLEEP=20
@@ -58,6 +58,11 @@ fi
# The slot number
if [ ! -z "$3" ]; then
SLOT=$3
+ # btape fill says "... slot 1 drive 0" :-(
+ if [ "$SLOT" = "slot" ]; then
+ shift
+ SLOT=$3
+ fi
fi
# Set tape device
if [ ! -z "$4" ]; then
@@ -65,16 +70,18 @@ if [ ! -z "$4" ]; then
fi
# Set drive for chio as you need
# here you can also map to any tape device
+# DRIVE is the chio drive number!
case $5 in
0)
DRIVE=0
+ TAPE=/dev/nrsa0
#DRIVE=1
#TAPE=/dev/nrsa2
;;
1)
DRIVE=1
#DRIVE=0
- #TAPE=/dev/nrsa1
+ TAPE=/dev/nrsa1
;;
esac
@@ -109,8 +116,16 @@ case ${COMMAND} in
# enable the following line if you need to eject the cartridge
mt -f ${TAPE} off
sleep 2
+ # if we have a slot, try it
+ if [ ! -z "$SLOT" ]; then
+ ${MTX} -f ${CHANGER} move drive ${DRIVE} slot $((${SLOT}-1))
+ exit $?
+ fi
+ # Try other way (works if source element information is valid for drive)
${MTX} -f ${CHANGER} return drive ${DRIVE}
# If the changer is power cycled with a tape loaded in a drive
+ # we can compute the slot in case of a complete filled magazine, with
+ # one slot free.
if [ "$?" != "0" ]; then
free_slot=`${MTX} -f ${CHANGER} stat | grep "^slot " | grep -v "FULL" | awk '{print $2}'`
free_slot=${free_slot%:}
diff --git a/sysutils/bacula-server/files/patch-autoconf-Make.common.in b/sysutils/bacula-server/files/patch-autoconf-Make.common.in
index b5e564ade083..ca86ad0ebff5 100644
--- a/sysutils/bacula-server/files/patch-autoconf-Make.common.in
+++ b/sysutils/bacula-server/files/patch-autoconf-Make.common.in
@@ -1,16 +1,6 @@
*** autoconf/Make.common.in.orig Sat Jun 19 23:16:06 2004
--- autoconf/Make.common.in Sun Jun 27 18:38:11 2004
***************
-*** 24,29 ****
---- 24,30 ----
- sysconfdir = @sysconfdir@
- scriptdir = @scriptdir@
- mandir = @mandir@/man1
-+ datadir = @datadir@
- manext = 1
-
- # Tools & program stuff
-***************
*** 43,49 ****
RANLIB = @RANLIB@
INSTALL = @INSTALL@
diff --git a/sysutils/bacula-server/files/patch-src-dird-sql_cmds.c b/sysutils/bacula-server/files/patch-src-dird-sql_cmds.c
deleted file mode 100644
index fa6be800fe38..000000000000
--- a/sysutils/bacula-server/files/patch-src-dird-sql_cmds.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/dird/sql_cmds.c 7 Feb 2004 17:27:11 -00001.22.2.7.2.3
-+++ src/dird/sql_cmds.c 23 Jul 2004 09:55:35 -0000
-@@ -261,7 +261,7 @@
- "ORDER BY StartTime ASC";
-
-
--char *uar_sel_jobid_temp = "SELECT JobId FROM temp";
-+char *uar_sel_jobid_temp = "SELECT JobId FROM temp ORDER BY StartTime ASC";
-
- char *uar_sel_all_temp1 = "SELECT * FROM temp1";