projects
/
debian
/
amanda
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Debian patch 2.5.1-1
[debian/amanda]
/
changer-src
/
chg-zd-mtx.sh.in
diff --git
a/changer-src/chg-zd-mtx.sh.in
b/changer-src/chg-zd-mtx.sh.in
index f0f0cbb3b8c1f29b263632254d373fdfd3385da4..52e750d18c284de18a6cf0d0b0f63aa30cb5ecbd 100644
(file)
--- a/
changer-src/chg-zd-mtx.sh.in
+++ b/
changer-src/chg-zd-mtx.sh.in
@@
-1,4
+1,4
@@
-#!
/bin/sh
+#!
@SHELL@
#
# Exit Status:
# 0 Alles Ok
#
# Exit Status:
# 0 Alles Ok
@@
-162,8
+162,10
@@
# in amanda.conf. For example, if amanda.conf has:
#
# changerfile="/etc/amanda/Dailyset1/CHANGER"
# in amanda.conf. For example, if amanda.conf has:
#
# changerfile="/etc/amanda/Dailyset1/CHANGER"
+# or changerfile="/etc/amanda/Dailyset1/CHANGER.conf"
#
# the variables must be in "/etc/amanda/Dailyset1/CHANGER.conf".
#
# the variables must be in "/etc/amanda/Dailyset1/CHANGER.conf".
+# The ".conf" is appended only if it's not there".
#
# If "changerfile" is a relative path, it is relative to the directory
# that contains amanda.conf. That also happens to be the directory Amanda
#
# If "changerfile" is a relative path, it is relative to the directory
# that contains amanda.conf. That also happens to be the directory Amanda
@@
-632,20
+634,20
@@
else
SUF=
fi
SUF=
fi
-DBGFILE=`amgetconf$SUF dbopen.$argv0 2>/dev/null
| grep -v BUGGY
`
+DBGFILE=`amgetconf$SUF dbopen.$argv0 2>/dev/null`
if [ -z "$DBGFILE" ]
then
DBGFILE=/dev/null # will try this again below
fi
if [ -z "$DBGFILE" ]
then
DBGFILE=/dev/null # will try this again below
fi
-changerfile=`amgetconf$SUF changerfile 2>/dev/null
| grep -v BUGGY
`
+changerfile=`amgetconf$SUF changerfile 2>/dev/null`
if [ -z "$changerfile" ]; then
Exit 2 \
"<none>" \
"changerfile must be specified in amanda.conf"
fi
if [ -z "$changerfile" ]; then
Exit 2 \
"<none>" \
"changerfile must be specified in amanda.conf"
fi
-tape=`amgetconf$SUF tapedev 2>/dev/null
| grep -v BUGGY
`
+tape=`amgetconf$SUF tapedev 2>/dev/null`
if [ -z "$tape" ]; then
Exit 2 \
"<none>" \
if [ -z "$tape" ]; then
Exit 2 \
"<none>" \
@@
-655,7
+657,7
@@
elif [ $tape = "/dev/null" -o `expr "$tape" : 'null:'` -eq 5 ]; then
"<none>" \
"tapedev ($tape) may not be the null device"
fi
"<none>" \
"tapedev ($tape) may not be the null device"
fi
-TAPE=`amgetconf$SUF changerdev 2>/dev/null
| grep -v BUGGY
`
+TAPE=`amgetconf$SUF changerdev 2>/dev/null`
if [ -z "$TAPE" ]; then
Exit 2 \
"<none>" \
if [ -z "$TAPE" ]; then
Exit 2 \
"<none>" \
@@
-669,7
+671,14
@@
export TAPE # for mtx command
#### Set up the various config files.
#### Set up the various config files.
-configfile=$changerfile.conf
+conf_match=`expr "$changerfile" : .\*\.conf\$`
+if [ $conf_match -ge 6 ]; then
+ configfile=$changerfile
+ changerfile=`echo $changerfile | sed 's/.conf$//g'`
+else
+ configfile=$changerfile.conf
+fi
+
cleanfile=$changerfile-clean
accessfile=$changerfile-access
slotfile=$changerfile-slot
cleanfile=$changerfile-clean
accessfile=$changerfile-access
slotfile=$changerfile-slot
@@
-1141,9
+1150,7
@@
info() {
if [ $currentslot -lt $firstslot -o $currentslot -gt $lastslot ]; then
currentslot=$firstslot # what "current" will get
fi
if [ $currentslot -lt $firstslot -o $currentslot -gt $lastslot ]; then
currentslot=$firstslot # what "current" will get
fi
- set x $slot_list
- shift # get rid of the "x"
- numslots=$#
+ numslots=`expr $lastslot - $firstslot + 1`
Exit 0 "$currentslot" "$numslots 1 $reader"
return $? # in case we are internal
}
Exit 0 "$currentslot" "$numslots 1 $reader"
return $? # in case we are internal
}