HomeClusterLabs Projects

Low: tools: check resource separately from managing parameter in cibsecret

Description

Low: tools: check resource separately from managing parameter in cibsecret

Previously, check_cib_rsc() redirected all output to /dev/null, then
attempted to use the output as an error message. Don't null it.

Also, check_cib_rsc() was called by get_cib_param(), which was called via
command subsitution (i.e. cmd or $(cmd)), which means it was executed in a
subshell. Therefore exiting in the failure condition did not exit the main script.
Instead, call check_cib_rsc() before calling functions like get_cib_param(),
so the failure message and exit take effect.

Details

Provenance
kgaillotAuthored on Jun 10 2020, 2:45 PM
wenningerkCommitted on Jun 16 2020, 12:42 PM
Parents
rP33269a68dd21: Refactor: tools: simplify cibsecret code
Branches
Unknown
Tags
Unknown

Event Timeline