meta-facebook: remove .sh suffix for scripts
Scripts and executables should not have a language-based extension
in order to simplify user operations and to avoid excessive refactoring
when rewrites are done. Remove all `.sh` extensions on scripts.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I408fa0f31e6064c0ce3c1559a4182cd625e91f21
diff --git a/meta-facebook/meta-yosemite4/recipes-networking/mctp/files/setup-static-endpoints b/meta-facebook/meta-yosemite4/recipes-networking/mctp/files/setup-static-endpoints
new file mode 100644
index 0000000..a4c9aba
--- /dev/null
+++ b/meta-facebook/meta-yosemite4/recipes-networking/mctp/files/setup-static-endpoints
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# Setup Endpoint for NICs, using devmem to read GPIO value since
+# the gpio pin is occupied by gpio-monitor, read the value from
+# gpioget is not possible.
+
+# shellcheck source=meta-facebook/meta-yosemite4/recipes-networking/mctp/files/nic-gpio-addrs
+. /usr/libexec/mctp/nic-gpio-addrs
+
+# Setup slot1 NIC
+gpio_val=$(devmem "$PRSNT_NIC0" "$WIDTH")
+if [ $((gpio_val & "$BITMASK_NIC0")) -eq 0 ]; then
+ systemctl start setup-nic-endpoint-slot@0.service
+fi
+
+# Setup slot2 NIC
+gpio_val=$(devmem "$PRSNT_NIC1" "$WIDTH")
+if [ $((gpio_val & "$BITMASK_NIC1")) -eq 0 ]; then
+ systemctl start setup-nic-endpoint-slot@1.service
+fi
+
+# Setup slot3 NIC
+gpio_val=$(devmem "$PRSNT_NIC2" "$WIDTH")
+if [ $((gpio_val & "$BITMASK_NIC2")) -eq 0 ]; then
+ systemctl start setup-nic-endpoint-slot@2.service
+fi
+
+# Setup slot4 NIC
+gpio_val=$(devmem "$PRSNT_NIC3" "$WIDTH")
+if [ $((gpio_val & "$BITMASK_NIC3")) -eq 0 ]; then
+ systemctl start setup-nic-endpoint-slot@3.service
+fi