#!/bin/bash # Provide source directive to shellcheck. gpioInitHighTable=( "power-nic-bmc-enable" "usb-bmc-enable" "reset-cause-usb-hub" "bmc-ready" "fan0-bmc-cpld-enable" "fan1-bmc-cpld-enable" "fan2-bmc-cpld-enable" "fan3-bmc-cpld-enable" ) gpio-init() { for gpioInitHigh in "${gpioInitHighTable[@]}" do # need the word splitting for gpiofind command. # shellcheck disable=SC2046 gpioset $(gpiofind "${gpioInitHigh}")=1 done } gpio-init