Skip to content

Commit

Permalink
Simplified TSM connection test to only call 'dsmc query session' (iss…
Browse files Browse the repository at this point in the history
…ue 1534)
  • Loading branch information
jsmeix committed Dec 13, 2017
1 parent 8671a58 commit 2475c9d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions usr/share/rear/verify/TSM/default/389_check_TSM_connection.sh
@@ -1,17 +1,19 @@
# Test connection to the TSM server.
#
# TODO: This should be enhanced to request a TSM password from the user
# Additionally this requests a general TSM password from the user
# when there is no TSM password file 'TSM.PWD' in the recovery system
# cf. https://github.com/rear/rear/issues/1642
# but it does not request possibly further TSM passwords from the user
# like passwords for encryption or decryption of files, cf.
# https://github.com/rear/rear/issues/1534#issuecomment-351313623
#
# Regarding usage of '0<&6 1>&7 2>&8' see
# "What to do with stdin, stdout, and stderr"
# in https://github.com/rear/rear/wiki/Coding-Style
#
# First try "dsmc query session" because it is faster than "dsmc query mgmt":
# Test with "dsmc query session" (it is faster than e.g. "dsmc query mgmt")
# and it is also enough for the prompt of the general TSM password, cf.
# https://github.com/rear/rear/issues/1534#issuecomment-351067465
dsmc query session 0<&6 1>&7 2>&8 && return
LogPrintError "Possibly no connection to TSM server ('dsmc query session' returns '$?')"
# When "dsmc query session" failed try "dsmc query mgmt":
dsmc query mgmt 0<&6 1>&7 2>&8 && return
Error "No connection to TSM server ('dsmc query mgmt' returns '$?')"
Error "No connection to TSM server ('dsmc query session' returns '$?')"

0 comments on commit 2475c9d

Please sign in to comment.