Merge pull request #104 from BarbarossaTM/chore/executor-cleanup

bond executor: grep for options only once
This commit is contained in:
Ariadne Conill 2020-10-10 22:42:13 -04:00 committed by GitHub
commit a1828c688b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,12 +11,8 @@ set -e
[ -n "$VERBOSE" ] && set -x [ -n "$VERBOSE" ] && set -x
get_bond_options() { get_bond_options() {
env | while IFS="=" read opt value; do
# We only care for options of format IF_BOND_<OPTION_NAME> # We only care for options of format IF_BOND_<OPTION_NAME>
if ! echo "${opt}" | grep -q '^IF_BOND_[A-Z0-9_]\+$'; then env | grep '^IF_BOND_[A-Z0-9_]\+$' | while IFS="=" read opt value; do
continue
fi
# Members are handled seperately # Members are handled seperately
if [ "${opt}" = "IF_BOND_MEMBERS" ]; then if [ "${opt}" = "IF_BOND_MEMBERS" ]; then
continue continue