tape-admin: improve verbosity output

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
2018-11-29 10:35:11 +01:00
parent 3e36474317
commit e1bc9f5d69

View File

@@ -831,9 +831,6 @@ mount_tape () {
ltfs_is_mounted ltfs_is_mounted
if test $? -eq 0; then if test $? -eq 0; then
if [ $verbose -ge 1 ]; then
printf "${MAGENTA}LTFS Tape is mounted.${NO_COLOR}\n"
fi
# get date from last written tape in given mediapool # get date from last written tape in given mediapool
if [ "${#volume_name}" -eq 0 ]; then if [ "${#volume_name}" -eq 0 ]; then
get_lastwrite ${mediapool_name} get_lastwrite ${mediapool_name}
@@ -846,12 +843,12 @@ mount_tape () {
mtx_getlabel $slot_source mtx_getlabel $slot_source
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
if [ $verbose -ge 2 ]; then if [ $verbose -ge 2 ]; then
printf "${MAGENTA}Tape in drive: ${GREEN}%s${NO_COLOR}\n" \ printf "${MAGENTA}Active tape in drive: ${GREEN}%s${NO_COLOR}\n" \
"${volume_name_active}" "${volume_name_active}"
fi fi
if [ "${#volume_name_active}" -ge 1 ] && [ "${volume_name_active}" != "${volume_name}" ]; then if [ "${#volume_name_active}" -ge 1 ] && [ "${volume_name_active}" != "${volume_name}" ]; then
if [ $verbose -ge 1 ]; then if [ $verbose -ge 2 ]; then
printf "${MAGENTA}Re-Mounting Tape: ${GREEN}%s${NO_COLOR}\n" \ printf "${MAGENTA}Re-Mounting requested Tape: ${GREEN}%s${NO_COLOR}\n" \
"${volume_name}" "${volume_name}"
fi fi
ltfs_umount ltfs_umount