shutdown: Call update from /run/initramfs directory
While both are the same directory via bind mount when shutdown
is executing from systemd use the full pathname to the script.
Signed-off-by: Milton Miller <miltonm@us.ibm.com>
diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-shutdown.sh b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-shutdown.sh
index bae572b..7d79cf0 100644
--- a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-shutdown.sh
+++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-shutdown.sh
@@ -30,7 +30,9 @@
done
set +x
+update=/run/initramfs/update
image=/run/initramfs/image-
+
if test -s /run/fw_env -a -c /run/mtd:u-boot-env -a ! -e ${image}u-boot-env &&
! cmp /run/mtd:u-boot-env /run/fw_env
then
@@ -39,11 +41,11 @@
if ls $image* > /dev/null 2>&1
then
- if test -x /update
+ if test -x $update
then
- /update
+ $update
else
- echo 1>&2 "Flash update requested but /update program missing!"
+ echo 1>&2 "Flash update requested but $update program missing!"
fi
fi