]> git.sur5r.net Git - bacula/bacula/commitdiff
Update mtx-changer script to make it backward compatible
authorKern Sibbald <kern@sibbald.com>
Thu, 15 Apr 2004 10:14:26 +0000 (10:14 +0000)
committerKern Sibbald <kern@sibbald.com>
Thu, 15 Apr 2004 10:14:26 +0000 (10:14 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1199 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/ChangeLog
bacula/ReleaseNotes
bacula/scripts/mtx-changer.in
bacula/src/lib/bnet_pkt.c
bacula/src/lib/bshm.c

index ed9bfd6628892bb546a2b0ef3030dd43822785d9..b6b338a6ab60b0e085654422f87e591d56c6c055 100644 (file)
@@ -1,9 +1,35 @@
 
+13Apr04
+- Fix crash in query command.
+- Remove schedule from the default restore job.
+- Fix data spooler to use min/max tape blocking factors.
+- Automatically turn of conio if library not found instead of bombing.
+- Cleaned up a lot of copyright dates.
+- Try to keep spool statistics from going negative.
+- Integrated wx-console code from Nicolas Boichat.
+09Apr04
+- Added new Pools chapter. Doc about using two disks.
+- Attempt to keep the spool file statistics size from going 
+  negative.
+-8Apr04
+- Fix the Director's Scheduled Jobs: list to have a ===
+  termination.
+- Fixed ./configure to disable readline rather than stop if 
+  readline.h is not found
+- Fixed a typo in the SQLite database update script as reported
+  by Robert J. Clark - thanks.
+07Apr04
+- Removed src/win32/pthreads and src/win32/zlib from the source
+  tree.
+- Created a new depkgs-win32 that has the pthreads and zlib source
+  code.
+- Removed the JobDefs from the default Restore job as it has a
+  schedule. Thanks to Matt Howard for this.
 
 
 2004-04-06 Version 1.34.0 06Apr04 Release
 06Apr04
-- Turn of SIGQUIT in console.
+- Turn off SIGQUIT in console.
 05Apr04
 - A good number of document updates.
 - Fixed the order which multiple files are accepted for 
index f6ce8e090545ef31a5fb23699ae4592f3d729f49..807e8fd718d9b092e01423ff8e9af8c83e854c61 100644 (file)
@@ -1,15 +1,34 @@
 
           Release Notes for Bacula 1.34.1
 
-  Bacula code: Total files = 306 Total lines = 91,131 (*.h *.c *.in)
+  Bacula code: Total files = 306 Total lines = 91,155 (*.h *.c *.in)
 
 Changes for 1.34.1:  
 - Autochanger users, please note you must add %d to the end of the
   changer command line in your Device resource in your bacula-sd.conf
   file.
-- Fixed a crash in the query command.
-- Removed the schedule from the default restore job.
+- Fix data spooler to use min/max tape blocking factors.
+- Automatically turn of conio if library not found instead of bombing.
+- Cleaned up a lot of copyright dates.
+- Try to keep spool statistics from going negative.
+- Added new Pools chapter. Doc about using two disks.
+- Attempt to keep the spool file statistics size from going
+  negative.
+- Fix the Director's Scheduled Jobs: list to have a ===
+  termination.
+- Fixed ./configure to disable readline rather than stop if
+  readline.h is not found
+- Fixed a typo in the SQLite database update script as reported
+  by Robert J. Clark - thanks.
+- Removed src/win32/pthreads and src/win32/zlib from the source
+  tree.
+- Created a new depkgs-win32 that has the pthreads and zlib source
+  code.
+- Removed the JobDefs from the default Restore job as it has a
+  schedule. Thanks to Matt Howard for this.
+
+
+
 Release 1.34.0
 Major Features:
 - Data spooling which reduces tape shoe-shine during Inc backups,         
index c5d202cc34371904660a4951fcdaf2ede40638ae..3e59e869079d46b7092d4f32fe410819c15d9ec9 100644 (file)
 
 MTX=@MTX@
 
-case "$2" in 
+if test $# -lt 2 ; then
+  echo "usage: mtx-changer ctl-device command slot archive-device drive"
+  echo "  Insufficient number of arguments arguments given."
+  echo "  Mimimum usage is first two arguments ..."
+  exit 1
+fi
+
+# Setup arguments
+ctl=$1
+cmd="$2"
+slot=$3
+device=$4
+# If drive not given, default to 0
+if test $# = 5 ; then
+  drive=$5
+else
+  drive=0
+fi
+
+#
+# Check for special cases where only 2 arguments are needed, 
+#  all others are a minimum of 3
+case $cmd in
+   loaded)
+     ;;
+   unload)
+     ;;
+   list)
+     ;;
+   slots)
+     ;;
+   *)
+     if test $# -lt 3; then
+       echo "usage: mtx-changer ctl-device command slot archive-device drive"
+       echo "  Insufficient number of arguments arguments given."
+       echo "  Mimimum usage is first three arguments ..."
+       exit 1
+     fi
+     ;;
+esac
+
+
+case $cmd in 
    unload)
-#     echo "Doing mtx -f $1 unload $3 $5"
+#     echo "Doing mtx -f $ctl unload $slot $drive"
 #
 # enable the following line if you need to eject the cartridge
-#     mt -f $4 offline
-      ${MTX} -f $1 unload $3 $5
+#     mt -f $device offline
+      if test x$slot = x; then
+        ${MTX} -f $ctl unload
+      else
+        ${MTX} -f $ctl unload $slot $drive
+      fi
       ;;
 
    load)
-#     echo "Doing mtx -f $1 load $3 $5"
-      ${MTX} -f $1 load $3 $5
+#     echo "Doing mtx -f $ctl load $slot $drive"
+      ${MTX} -f $ctl load $slot $drive
       rtn=$?
 #
 # Increase the sleep time if you have a slow device
@@ -50,20 +96,20 @@ case "$2" in
 
    list) 
 #     echo "Requested list"
-      ${MTX} -f $1 status | grep " *Storage Element [0-9]*:.*Full" | awk "{print \$3 \$4}" | sed "s/Full *\(:VolumeTag=\)*//"
+      ${MTX} -f $ctl status | grep " *Storage Element [0-9]*:.*Full" | awk "{print \$slot \$device}" | sed "s/Full *\(:VolumeTag=\)*//"
       ;;
 
    loaded)
-      ${MTX} -f $1 status >/tmp/mtx.$$
+      ${MTX} -f $ctl status >/tmp/mtx.$$
       rtn=$?
-      cat /tmp/mtx.$$ | grep "^Data Transfer Element $5:Full" | awk "{print \$7}"
-      cat /tmp/mtx.$$ | grep "^Data Transfer Element $5:Empty" | awk "{print 0}"
+      cat /tmp/mtx.$$ | grep "^Data Transfer Element $drive:Full" | awk "{print \$7}"
+      cat /tmp/mtx.$$ | grep "^Data Transfer Element $drive:Empty" | awk "{print 0}"
       rm -f /tmp/mtx.$$
       exit $rtn
       ;;
 
    slots)
 #     echo "Request slots"
-      ${MTX} -f $1 status | grep " *Storage Changer" | awk "{print \$5}"
+      ${MTX} -f $ctl status | grep " *Storage Changer" | awk "{print \$drive}"
       ;;
 esac
index 5de132b41975f3f41a135b7b7407a8409cc82577..a803866c3c5054cb23a153757bd6822a54369338 100644 (file)
@@ -26,6 +26,7 @@
 
  */
 
+#ifdef implemented
 
 #include "bacula.h"
 
@@ -148,3 +149,5 @@ bnet_send_pkt(BSOCK *bsock, BPKT *pkt, int version)
    }
    ser_end(bsock->msg, 0);
 }
+
+#endif
index ed65fce4d2322dcbf40afe4cd28667e8030a18e0..063290481305289b70abff7cb573eca15d1097b6 100644 (file)
@@ -39,6 +39,8 @@
 
  */
 
+#ifdef implemented
+
 #include "bacula.h"
 
 #if !defined(HAVE_CYGWIN) && !defined(HAVE_WIN32)
@@ -149,3 +151,5 @@ void shm_destroy(BSHM *shm)
 }
 
 #endif /* ! HAVE_CYGWIN */
+
+#endif