-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No longer use the StopIfError function but plain bash "COMMAND || Error" cf. daf35e2
- Loading branch information
Showing
1 changed file
with
4 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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." |
61da949
There was a problem hiding this comment.
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"