case ${OS} in
SunOS)
ready="No Additional Sense"
+ # Sun sed/awk etc are not sufficient, working versions are in /usr/xpg4/bin
+ export PATH="/usr/local/sbin:/usr/local/bin:/usr/sfw/bin:/usr/xpg4/bin:/usr/bin"
;;
FreeBSD)
ready="Current Driver State: at rest."
wait_for_drive() {
i=0
while [ $i -le 300 ]; do # Wait max 300 seconds
- if mt -f $1 status | grep ${ready} >/dev/null 2>&1; then
+ if mt -f $1 status 2>&1 | grep "${ready}" >/dev/null 2>&1; then
break
fi
debug "Device $1 - not ready, retrying..."
pCountNeed=$2
if test $pCount -lt $pCountNeed; then
echo "usage: mtx-changer ctl-device command [slot archive-device drive-index]"
- echo " Insufficient number of arguments arguments given."
+ echo " Insufficient number of arguments given."
if test $pCount -lt 2; then
echo " Mimimum usage is first two arguments ..."
else