Enhancements to validate_sdp.sh:
* Added simple bold ALL CLEAN message to look for.
* Added check_env_var() function to check shell environment
variables, with some calls to it.
* Added check_configurable() to check for configurables. This
is implemented using back-door check methodology (using
'p4d_N -cshow') so values can be checked with P4D offline.
This replaced stub function check_var().
* Removed stub function check_configurables(). It's easier
to understand if all checks in the Main section of the code.
* Changed so checks requiring p4d to be online are not done
by default; added '-online' flag to run those tests. This
is because I anticpate typical usage of the validator to
be requiring it to be report ALL CLEAN before starting
P4D after a server upgrade.
* Added check for new $SDP_ADMIN_PASSWORD_FILE variable.
* Added check admin password file pointed to by $SDP_ADMIN_PASSWORD_FILE.
* Added errmsg() function, with corresponding tweak to bail().
* Consolidated Log an LOGIFLE to just LOGFILE.
* Removed a few items from TOOD comments that got done.
* Made a few tweaks for style normalization:
- Functions are lowercase with undescore separators.
- Functions vars are lowercase-initiated camelCase.
- Indentation: 3 spaces for functions/loops/etc.
* Added run() function replacing cmd() stub function.
* Enhanced p4login check.
* Added comment noting why this script uses self-contained
copies of functions defined in other SDP files in /p4/common/lib.
* And other things.
Warning: In the short run, this may fail tests as the new
SDP_ADMIN_PASSWORD_FILE variable is also pending review.