1#!/bin/bash 2# Provide source directive to shellcheck. 3gpioInitHighTable=( 4 "power-nic-bmc-enable" 5 "usb-bmc-enable" 6 "reset-cause-usb-hub" 7 "bmc-ready" 8 "fan0-bmc-cpld-enable" 9 "fan1-bmc-cpld-enable" 10 "fan2-bmc-cpld-enable" 11 "fan3-bmc-cpld-enable" 12) 13 14gpio-init() 15{ 16 for gpioInitHigh in "${gpioInitHighTable[@]}" 17 do 18 # need the word splitting for gpiofind command. 19 # shellcheck disable=SC2046 20 gpioset $(gpiofind "${gpioInitHigh}")=1 21 done 22} 23 24gpio-init 25