tape-admin: indentation update
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
@@ -901,8 +901,8 @@ ltfs_reformat () {
|
|||||||
fi
|
fi
|
||||||
# wiping: put tape in an unformatted state
|
# wiping: put tape in an unformatted state
|
||||||
ltfs_wipe
|
ltfs_wipe
|
||||||
# RET = 8 -> error?
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
|
# format: create the ltfs partitions
|
||||||
ltfs_format $volume_name_active $volume_serial
|
ltfs_format $volume_name_active $volume_serial
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
ltfs_mount
|
ltfs_mount
|
||||||
@@ -1091,7 +1091,7 @@ mount_tape () {
|
|||||||
|
|
||||||
ltfs_is_mounted
|
ltfs_is_mounted
|
||||||
if test $? -eq 0; then
|
if test $? -eq 0; then
|
||||||
# get date from last written tape in given mediapool
|
# if no explicit tape should be mounted, 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}
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
@@ -1128,7 +1128,7 @@ mount_tape () {
|
|||||||
# check if given tape is poolmember of selected pool
|
# check if given tape is poolmember of selected pool
|
||||||
get_poolmember ${mediapool_name} ${volume_name}
|
get_poolmember ${mediapool_name} ${volume_name}
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
# volume_name is member of given mediapool
|
# check the mediapolicy for given volume_name
|
||||||
get_mediapolicy ${mediapool_name} ${volume_name_active}
|
get_mediapolicy ${mediapool_name} ${volume_name_active}
|
||||||
if [ ${#volume_mediapolicy} -gt 0 ]; then
|
if [ ${#volume_mediapolicy} -gt 0 ]; then
|
||||||
if [ ${volume_mediapolicy} = "append" ] ; then
|
if [ ${volume_mediapolicy} = "append" ] ; then
|
||||||
@@ -1147,6 +1147,8 @@ mount_tape () {
|
|||||||
printf "${MAGENTA}Valid tape, retensiondate has exposed: ${GREEN}%s${NO_COLOR}\n" \
|
printf "${MAGENTA}Valid tape, retensiondate has exposed: ${GREEN}%s${NO_COLOR}\n" \
|
||||||
"${volume_retensiondate}"
|
"${volume_retensiondate}"
|
||||||
fi
|
fi
|
||||||
|
#ltfs_format ${volume_name_active}
|
||||||
|
ltfs_reformat ${volume_name_active}
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -eq 1 ]; then
|
||||||
@@ -1188,7 +1190,7 @@ mount_tape () {
|
|||||||
"${volume_name}"
|
"${volume_name}"
|
||||||
fi
|
fi
|
||||||
ltfs_wipe
|
ltfs_wipe
|
||||||
#ltfs_format ${volume_name} ${volume_serial}
|
#ltfs_reformat ${volume_name_active}
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
@@ -1298,7 +1300,7 @@ mount_tape () {
|
|||||||
RET=$?
|
RET=$?
|
||||||
if [ $RET -eq 2 ]; then
|
if [ $RET -eq 2 ]; then
|
||||||
if [ $verbose -ge 1 ]; then
|
if [ $verbose -ge 1 ]; then
|
||||||
printf "${MAGENTA}RetensionDate has exposed, mount the tape\n"
|
printf "${MAGENTA}RetensionDate has exposed, mount the tape${NO_COLOR}\n"
|
||||||
fi
|
fi
|
||||||
ltfs_mount
|
ltfs_mount
|
||||||
return 0
|
return 0
|
||||||
@@ -1326,7 +1328,7 @@ mount_tape () {
|
|||||||
if [ $? -eq 2 ]; then
|
if [ $? -eq 2 ]; then
|
||||||
# retensiondate has exposed: wipe given tape
|
# retensiondate has exposed: wipe given tape
|
||||||
ltfs_wipe
|
ltfs_wipe
|
||||||
#ltfs_format ${volume_name} ${volume_serial}
|
ltfs_format ${volume_name} ${volume_serial}
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
@@ -1386,7 +1388,7 @@ mtx_getlabel () {
|
|||||||
volume_name_active=$(perl -ne '
|
volume_name_active=$(perl -ne '
|
||||||
/Data Transfer Element (\d+):Full \(Storage Element (\d+) Loaded\)(:VolumeTag =\s*(.+))?/ && print "$4\n";' ${TMPFILE})
|
/Data Transfer Element (\d+):Full \(Storage Element (\d+) Loaded\)(:VolumeTag =\s*(.+))?/ && print "$4\n";' ${TMPFILE})
|
||||||
volume_name_active=$(echo $volume_name_active | sed -e 's/ *$//g')
|
volume_name_active=$(echo $volume_name_active | sed -e 's/ *$//g')
|
||||||
if [ $verbose -ge 2 ]; then
|
if [ $verbose -ge 2 ] && [ ${#volume_name_active} -gt 0 ]; then
|
||||||
printf "${MAGENTA}Tape in slot ${GREEN}%s${MAGENTA} has Label: ${GREEN}%s${NO_COLOR}\n" \
|
printf "${MAGENTA}Tape in slot ${GREEN}%s${MAGENTA} has Label: ${GREEN}%s${NO_COLOR}\n" \
|
||||||
"${slot_source}" "${volume_name_active}"
|
"${slot_source}" "${volume_name_active}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user