mej / nhc

LBNL Node Health Check
Other
213 stars 78 forks source link

nhc: Use subshell syntax for offline/online ops #131

Closed mej closed 1 year ago

mej commented 1 year ago

Using eval to invoke the node online and offline helper utilities makes some assumptions about the content of each variable, and those assumptions don't always match up with reality.

As suggested by @thedavidwhiteside in #14, using a subshell allows for the same result but takes advantage of BASH-internal quoting mechanisms that are content-driven. No assumptions needed.

For consistency, I updated both the "online" and "offline" invocations.

Fixes #14.