Skip to content

Commit

Permalink
Update 400_verify_dp.sh
Browse files Browse the repository at this point in the history
No longer use the StopIfError function but plain bash "COMMAND || Error"
cf. daf35e2
  • Loading branch information
jsmeix committed Jul 6, 2020
1 parent a3cd469 commit 61da949
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions usr/share/rear/verify/DP/default/400_verify_dp.sh
@@ -1,14 +1,13 @@
# 400_verify_dp.sh
# read Data Protector vars from config file

CELL_SERVER="`cat /etc/opt/omni/client/cell_server`"
CELL_SERVER="$( cat /etc/opt/omni/client/cell_server )"
OMNICHECK=/opt/omni/bin/omnicheck

# the Cell Manager must be configured on the client
[ "${CELL_SERVER}" ]
StopIfError "Data Protector Cell Manager TCPSERVERADDRESS not set in /etc/opt/omni/client/cell_server"
# TODO: the above comment and the error message do not match the test (does not actually test TCPSERVERADDRESS)
[ "${CELL_SERVER}" ] || Error "Data Protector Cell Manager TCPSERVERADDRESS not set in /etc/opt/omni/client/cell_server"

# check that the Cell Manager is responding on the INET port
${OMNICHECK} -patches -host ${CELL_SERVER}
StopIfError "Data Protector Cell Manager is not responding, error code $?.
${OMNICHECK} -patches -host ${CELL_SERVER} || Error "Data Protector Cell Manager is not responding, error code $?.
See $RUNTIME_LOGFILE for more details."

1 comment on commit 61da949

@sebastian-koehler
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If /etc/opt/omni/client/cell_server exists and contains something, we're good. We should use test -s instead.

test -s "${CELL_SERVER}" || Error "Data Protector Cell Manager not configured in /etc/opt/omni/client/cell_server"

Please sign in to comment.