meta-facebook: fix up new shellcheck warnings
New docker container is flagging some issues in this shell script:
```
SC2004 (style): $/${} is unnecessary on arithmetic variables.
SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).
```
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I9806a097ca417d8677374efd666f2a8865a0a2fd
diff --git a/meta-facebook/recipes-phosphor/datetime/phosphor-time-manager/set-bmc-time-from-host b/meta-facebook/recipes-phosphor/datetime/phosphor-time-manager/set-bmc-time-from-host
index 40b3b8c..8d6d3ae 100644
--- a/meta-facebook/recipes-phosphor/datetime/phosphor-time-manager/set-bmc-time-from-host
+++ b/meta-facebook/recipes-phosphor/datetime/phosphor-time-manager/set-bmc-time-from-host
@@ -72,7 +72,7 @@
if [[ $(echo "$multi_host_time_result" | awk '{ print NF }') -eq 18 ]];
then
- echo "syncing up host " $index " date time with bmc..."
+ echo "syncing up host " "$index" " date time with bmc..."
date -s @$((0x$(echo "$multi_host_time_result" | \
awk '{printf "%02x%02x%02x%02x",$18,$17,$16,$15}')))
sync
diff --git a/meta-facebook/recipes-phosphor/fans/phosphor-fan/greatlakes/host-poweroff b/meta-facebook/recipes-phosphor/fans/phosphor-fan/greatlakes/host-poweroff
index bd43954..3b4d9d9 100644
--- a/meta-facebook/recipes-phosphor/fans/phosphor-fan/greatlakes/host-poweroff
+++ b/meta-facebook/recipes-phosphor/fans/phosphor-fan/greatlakes/host-poweroff
@@ -19,7 +19,7 @@
echo "chosen host id :::$host_id"
# host power off
- output=$(busctl set-property $DBUS_SERVICE$host_id $DBUS_OBJECT$host_id $DBUS_INTERFACE $DBUS_PROPERTY s $PROPERTY_VALUE)
+ output=$(busctl set-property $DBUS_SERVICE"$host_id" $DBUS_OBJECT"$host_id" $DBUS_INTERFACE $DBUS_PROPERTY s $PROPERTY_VALUE)
echo "$output"
done
diff --git a/meta-facebook/recipes-phosphor/fans/phosphor-fan/yosemitev2/host-poweroff b/meta-facebook/recipes-phosphor/fans/phosphor-fan/yosemitev2/host-poweroff
index 782f085..14638d6 100644
--- a/meta-facebook/recipes-phosphor/fans/phosphor-fan/yosemitev2/host-poweroff
+++ b/meta-facebook/recipes-phosphor/fans/phosphor-fan/yosemitev2/host-poweroff
@@ -19,7 +19,7 @@
echo "chosen host id :::$host_id"
# host power off
- output=$(busctl set-property $DBUS_SERVICE$host_id $DBUS_OBJECT$host_id $DBUS_INTERFACE $DBUS_PROPERTY s $PROPERTY_VALUE)
+ output=$(busctl set-property $DBUS_SERVICE"$host_id" $DBUS_OBJECT"$host_id" $DBUS_INTERFACE $DBUS_PROPERTY s $PROPERTY_VALUE)
echo "$output"
done