From 8648195fe8571a079cef7a8aea39d1c469218767 Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Sat, 16 Aug 2008 14:24:37 -0300 Subject: [PATCH] revert chg-multi.sh.in and apply patch from svn for typos --- changer-src/chg-multi.sh.in | 46 +++++++++++++++++++++++++++++-------- debian/changelog | 2 ++ 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/changer-src/chg-multi.sh.in b/changer-src/chg-multi.sh.in index a5d3fdb..af32432 100644 --- a/changer-src/chg-multi.sh.in +++ b/changer-src/chg-multi.sh.in @@ -30,27 +30,53 @@ # chg-multi.sh - generic tape changer script # -# source utility functions and values from configure +prefix=@prefix@ exec_prefix=@exec_prefix@ +sbindir=@sbindir@ libexecdir=@libexecdir@ -. ${libexecdir}/chg-lib.sh pname="chg-multi" +PATH=$sbindir:$libexecdir:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ucb +export PATH + if [ -d "@AMANDA_DBGDIR@" ]; then logfile=@AMANDA_DBGDIR@/changer.debug else logfile=/dev/null fi +# support simultaneous development with and without gettext +_() { + fmt="$1" + shift + printf "$fmt" $* +} + echo `_ "arguments ->"` "$@" >> $logfile -ourconf=`amgetconf changerfile` +USE_VERSION_SUFFIXES="@USE_VERSION_SUFFIXES@" +if test "$USE_VERSION_SUFFIXES" = "yes"; then + SUF="-@VERSION@" +else + SUF= +fi + +ourconf=`amgetconf$SUF changerfile` -if ! error=try_find_mt; then - echo $error - exit 2 +if [ -x $sbindir/ammt$SUF ]; then + MT=$sbindir/ammt$SUF + MTF=-f +elif [ -x "@MT@" ]; then + MT=@MT@ + MTF=@MT_FILE_FLAG@ +else + answer=`_ ' %s: mt program not found' "$myname"` + echo `_ 'Exit ->'` $answer >> $logfile + echo $answer + exit 1 fi +echo "MT ->" $MT $MTF >> $logfile EXPR=expr # EXPR=/usr/local/bin/expr # in case you need a more powerful expr... @@ -300,7 +326,8 @@ then exit 2 fi echo `_ ' -> offline'` "$device" >> $logfile - if ! try_eject_device $device; then + $MT $MTF $device offline >> $logfile 2>&1 + if [ $? -ne 0 ]; then answer=`_ '%s %s: %s: unable to change to slot %s' "$newslot" "$pname" "$device" "$curslot"` echo `_ 'Exit ->'` $answer >> $logfile echo $answer @@ -343,7 +370,7 @@ then exit 2 fi echo `_ ' -> offline'` $device >> $logfile - try_eject_device $device + $MT $MTF $device offline >> $logfile 2>&1 if [ $? -ne 0 ]; then # # XXX if the changer-specific eject command can distinguish @@ -382,7 +409,8 @@ if [ $loadslot -eq 1 ]; then # load the tape from the slot echo $answer exit 2 fi - amdevcheck_status $device + echo `_ ' -> rewind'` $device >> $logfile + $MT $MTF $device rewind >> $logfile 2>&1 if [ $? -ne 0 ]; then # # XXX if the changer-specific load command can distinguish diff --git a/debian/changelog b/debian/changelog index 268906e..38d7f2a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ amanda (1:2.5.2p1-4) UNRELEASED; urgency=high * update version thresholds in Replaces to ease upgrades, closes: #476583 * don't set maxdumpsize in the default amanda.conf, closes: #475524 * freshen to latest standards version + * revert chg-multi.sh.in and patch since the new version previously pulled + in caused more problems than it solved, closes: #486384 -- Bdale Garbee Sat, 16 Aug 2008 12:05:05 -0300 -- 2.30.2