meta-ingrasys: fix shellcheck issues

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I5fd106fcc9de9895bc0d79f265e5c0ab06ee624a
diff --git a/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/avsbus-control/zaius_avsbus.sh b/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/avsbus-control/zaius_avsbus.sh
index 57e7f99..93d1928 100755
--- a/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/avsbus-control/zaius_avsbus.sh
+++ b/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/avsbus-control/zaius_avsbus.sh
@@ -18,8 +18,8 @@
 # Initializes the AVSBus VOUT setpoint to the value in PMBus VOUT_COMMAND
 vrm_avs_enable()
 {
-    echo Enabling AVSBus on bus $1 VRM @$2 rail $3...
-    echo 1 > $(echo ${i2c_path}/$1-$(printf "%04x" $2)/hwmon/hwmon*/avs$(printf "%d" $3)_enable)
+    echo "Enabling AVSBus on bus $1 VRM @$2 rail $3..."
+    echo 1 > "${i2c_path}/$1-$(printf "%04x" "$2")/hwmon/hwmon*/avs$(printf "%d" "$3")_enable"
 }
 
 # Usage: vrm_avs_disable <bus> <i2c_address> <page>
@@ -29,8 +29,8 @@
 # - AVSBus Copy: VOUT_COMMAND remains unchanged
 vrm_avs_disable()
 {
-    echo Disabling AVSBus on bus $1 VRM @$2 rail $3...
-    echo 0 > $(echo ${i2c_path}/$1-$(printf "%04x" $2)/hwmon/hwmon*/avs$(printf "%d" $3)_enable)
+    echo "Disabling AVSBus on bus $1 VRM @$2 rail $3..."
+    echo 0 > "${i2c_path}/$1-$(printf "%04x" "$2")/hwmon/hwmon*/avs$(printf "%d" "$3")_enable"
 }
 
 # Usage: for_each_rail <command>
@@ -41,15 +41,15 @@
     do
         for addr_page in $addrs_pages
         do
-            $1 $bus `echo $addr_page | tr : " "`
+            $1 "$bus" "$(echo "$addr_page" | tr : " ")"
         done
     done
 }
 
-if [ "$1" == "enable" ]
+if [ "$1" = "enable" ]
 then
     for_each_rail vrm_avs_enable
-elif [ "$1" == "disable" ]
+elif [ "$1" = "disable" ]
 then
     for_each_rail vrm_avs_disable
 else
diff --git a/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/vcs-control.bb b/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/vcs-control.bb
index 903ce45..e6ab99f 100644
--- a/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/vcs-control.bb
+++ b/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/vcs-control.bb
@@ -21,7 +21,7 @@
 SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT_ON', 'OBMC_CHASSIS_INSTANCES')}"
 
 SRC_URI += "file://zaius_vcs.sh"
-RDEPENDS:${PN} += "i2c-tools"
+RDEPENDS:${PN} += "bash i2c-tools"
 
 do_install() {
         install -d ${D}${bindir}
diff --git a/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/vcs-control/zaius_vcs.sh b/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/vcs-control/zaius_vcs.sh
index 49bf0b0..528bc36 100755
--- a/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/vcs-control/zaius_vcs.sh
+++ b/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/vcs-control/zaius_vcs.sh
@@ -1,12 +1,10 @@
-#!/bin/sh -e
+#!/bin/bash -e
 # Read and control VCS rails by sending the UCD power sequencer I2C commands.
 # This script assumes that the UCD is controlling VCS rails as GPIOs 5 and 6.
 # Also assumes that those GPIOs are already enabled.
 
 ucd_bus="0"
 ucd_addr="0x64"
-ucd_path="/sys/bus/i2c/drivers/ucd9000"
-ucd_driver="${ucd_bus}-00${ucd_addr#0x}"
 ucd_retries="5"
 
 retry()
@@ -14,7 +12,7 @@
     local i=0
     until [ $i -ge $ucd_retries ]; do
         i=$((i+1))
-        retry_output=`$@` && break
+        retry_output=$("$@") && break
     done
     local ret=$?
     if [ $i -eq $ucd_retries ]; then exit $ret; fi
@@ -24,26 +22,26 @@
 # Result stored in $ucd_reg
 ucd_get()
 {
-    retry i2cget -f -y $ucd_bus $ucd_addr $1 b
+    retry i2cget -f -y $ucd_bus $ucd_addr "$1" b
     ucd_reg=$retry_output
 }
 
 # Usage: ucd_get address value
 ucd_set()
 {
-    retry i2cset -f -y $ucd_bus $ucd_addr $1 $2 b
+    retry i2cset -f -y $ucd_bus $ucd_addr "$1" "$2" b
 }
 
 vcs_set_gpios()
 {
     echo -e "\tSetting UCD GPIO 5 to $1"
     ucd_set 0xFA 5
-    ucd_set 0xFB $1
-    ucd_set 0xFB $1
+    ucd_set 0xFB "$1"
+    ucd_set 0xFB "$1"
     echo -e "\tSetting UCD GPIO 6 to $1"
     ucd_set 0xFA 6
-    ucd_set 0xFB $1
-    ucd_set 0xFB $1
+    ucd_set 0xFB "$1"
+    ucd_set 0xFB "$1"
 }
 
 vcs_get()
@@ -51,11 +49,12 @@
     echo Reading VCS settings
     ucd_set 0xFA 5
     ucd_get 0xFB
-    local val=`echo $ucd_reg | grep -i -c 0x0f`
+    local val=
+    val=$(echo "$ucd_reg" | grep -i -c 0x0f)
     echo -e "\tUCD GPIO 5 state=$val"
     ucd_set 0xFA 6
     ucd_get 0xFB
-    local val=`echo $ucd_reg | grep -i -c 0x0f`
+    val=$(echo "$ucd_reg" | grep -i -c 0x0f)
     echo -e "\tUCD GPIO 6 state=$val"
 }
 
diff --git a/meta-phosphor/scripts/run-repotest b/meta-phosphor/scripts/run-repotest
index 2d8a04c..cbb7f42 100755
--- a/meta-phosphor/scripts/run-repotest
+++ b/meta-phosphor/scripts/run-repotest
@@ -127,8 +127,6 @@
 meta-google/recipes-phosphor/flash/inplace-gbmc-update/inplace-gbmc-verify.sh
 meta-ibm/meta-romulus/recipes-phosphor/chassis/vrm-control/vrm-control.sh
 meta-ibm/recipes-phosphor/chassis/vrm-control/vrm-control.sh
-meta-ingrasys/meta-zaius/recipes-phosphor/chassis/avsbus-control/zaius_avsbus.sh
-meta-ingrasys/meta-zaius/recipes-phosphor/chassis/vcs-control/zaius_vcs.sh
 meta-inventec/meta-transformers/recipes-phosphor/init/transformers-init/transformers-init.sh
 meta-openpower/recipes-bsp/pdata/files/power-target.sh
 meta-openpower/recipes-phosphor/network/first-boot-set-hostname/first-boot-set-hostname.sh