From c17e6444dd366f0b7d03d04f781bf0d5088007b4 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Fri, 2 Jun 2023 16:29:54 -0700 Subject: meta-google: host-power-control: Fix shellcheck issues Change-Id: I9f67bc4aab9603188779c4488aef4eba6936f595 Signed-off-by: William A. Kennington III --- .../recipes-google/host-power-ctrl/gpio-host-pwr/host_isoff.sh | 1 + .../host-power-ctrl/gpio-host-pwr/host_powercycle.sh | 1 + .../recipes-google/host-power-ctrl/gpio-host-pwr/host_poweroff.sh | 1 + .../recipes-google/host-power-ctrl/gpio-host-pwr/host_poweron.sh | 1 + .../recipes-google/host-power-ctrl/gpio-host-pwr/host_reset.sh | 1 + meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/lib.sh | 7 +++++++ 6 files changed, 12 insertions(+) (limited to 'meta-google/recipes-google/host-power-ctrl') diff --git a/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_isoff.sh b/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_isoff.sh index 4119801b03..0c65b0b783 100755 --- a/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_isoff.sh +++ b/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_isoff.sh @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# shellcheck source=meta-google/recipes-google/gpio/gpio-ctrl/lib.sh source /usr/share/gpio-host-pwr/lib.sh || exit gpio_build_cache 10 "$HOST_GPIO_PGOOD" || exit 255 diff --git a/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_powercycle.sh b/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_powercycle.sh index 3c8f002590..5f12468e74 100644 --- a/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_powercycle.sh +++ b/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_powercycle.sh @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# shellcheck source=meta-google/recipes-google/gpio/gpio-ctrl/lib.sh source /usr/share/gpio-host-pwr/lib.sh || exit gpio_build_cache 10 "$HOST_GPIO_PGOOD" "$HOST_GPIO_PWR_BTN" || exit diff --git a/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_poweroff.sh b/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_poweroff.sh index 58c1da8565..7d93a4a758 100755 --- a/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_poweroff.sh +++ b/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_poweroff.sh @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# shellcheck source=meta-google/recipes-google/gpio/gpio-ctrl/lib.sh source /usr/share/gpio-host-pwr/lib.sh || exit gpio_build_cache 10 "$HOST_GPIO_PGOOD" "$HOST_GPIO_PWR_BTN" || exit diff --git a/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_poweron.sh b/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_poweron.sh index 2e6eb0217a..b115c9b728 100755 --- a/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_poweron.sh +++ b/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_poweron.sh @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# shellcheck source=meta-google/recipes-google/gpio/gpio-ctrl/lib.sh source /usr/share/gpio-host-pwr/lib.sh || exit gpio_build_cache 10 "$HOST_GPIO_PGOOD" "$HOST_GPIO_PWR_BTN" || exit diff --git a/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_reset.sh b/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_reset.sh index 2f48a12403..d935a410cb 100755 --- a/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_reset.sh +++ b/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/host_reset.sh @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# shellcheck source=meta-google/recipes-google/gpio/gpio-ctrl/lib.sh source /usr/share/gpio-host-pwr/lib.sh || exit if [[ "${1-}" == "warm" ]]; then diff --git a/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/lib.sh b/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/lib.sh index d523c5dfa0..ec9723f267 100644 --- a/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/lib.sh +++ b/meta-google/recipes-google/host-power-ctrl/gpio-host-pwr/lib.sh @@ -17,23 +17,30 @@ # Executing this directly will do nothing. [ -n "${host_pwr_init-}" ] && return +# shellcheck source=meta-google/recipes-google/gpio/gpio-ctrl/lib.sh source /usr/share/gpio-ctrl/lib.sh || exit # Read by the tooling to determine if the machine is powered on or off +# shellcheck disable=SC2034 HOST_GPIO_PGOOD='unset' # Set according to whether the host is powered on or off +# shellcheck disable=SC2034 HOST_LED_PWR='' # Written by the tooling to assert the power button +# shellcheck disable=SC2034 HOST_GPIO_PWR_BTN='unset' # Written by the tooling to assert a cold reset +# shellcheck disable=SC2034 HOST_GPIO_COLD_RESET='unset' # Written by the tooling to assert a warm reset +# shellcheck disable=SC2034 HOST_GPIO_WARM_RESET='unset' # Load configurations from a known location in the filesystem to populate # named GPIOs shopt -s nullglob for conf in /usr/share/gpio-host-pwr/conf.d/*.sh; do + # shellcheck source=/dev/null source "$conf" done -- cgit v1.2.3