meta-hpe: remove bash dependency

Images built for HPE machines become too large when bash is added as a dependency.

Change-Id: Ib6e49647c22f1d0345ef44ffc9140ac73ed999b1
Signed-off-by: Charles Kearney <charles.kearney@hpe.com>
diff --git a/meta-hpe/meta-common/recipes-phosphor/initrdscripts/files/gxp-obmc-init.sh b/meta-hpe/meta-common/recipes-phosphor/initrdscripts/files/gxp-obmc-init.sh
index 53905fc..b61f9c2 100644
--- a/meta-hpe/meta-common/recipes-phosphor/initrdscripts/files/gxp-obmc-init.sh
+++ b/meta-hpe/meta-common/recipes-phosphor/initrdscripts/files/gxp-obmc-init.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 fslist="proc sys dev run"
 rodir=run/initramfs/ro
@@ -7,7 +7,10 @@
 work=$rwdir/work
 
 cd /
-mkdir -p "$fslist"
+for f in $fslist
+do
+	mkdir -p "$f"
+done
 mount dev dev -tdevtmpfs
 mount sys sys -tsysfs
 mount proc proc -tproc
@@ -125,15 +128,23 @@
 	fi
 }
 
+getch() {
+        old=$(stty -g)
+        stty raw -echo min 0 time 50
+        printf '%s' "$(dd bs=1 count=1 2>/dev/null)"
+        stty "$old"
+}
+
 debug_takeover() {
 	echo "$@"
-	read -t 5 -n 1 -s -r -p  "Press any key to log in and try to manually fix, force recovery in 5 seconds"
-	if test $? -gt 0
+	echo "Press (Y/y) to log in and try to manually fix, force recovery in 5 seconds"
+	answer=$(getch)
+	if [ "$answer" != "y" ] && [ "$answer" != "Y" ] ; 
 	then
 		mkdir -p /var/lock
 		envdev=$(findmtd u-boot-env)
-		echo -e "/dev/${envdev}\t0x00000\t0x10000" > /etc/fw_env.config
-		echo -e "/dev/${envdev}\t0x10000\t0x10000" >> /etc/fw_env.config
+		echo "/dev/${envdev}     0x00000     0x10000" > /etc/fw_env.config
+		echo "/dev/${envdev}     0x10000     0x10000" >> /etc/fw_env.config
 		fw_setenv force_recovery 1
 		fw_setenv last_booterrmsg "$@"
 		devmem 0xc0000000 32 0x01