[PATCH openbmc v2 05/34] shutdown: Call update from /run/initramfs directory
OpenBMC Patches
openbmc-patches at stwcx.xyz
Tue Mar 8 08:29:54 AEDT 2016
From: "Milton D. Miller II" <miltonm at us.ibm.com>
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 at us.ibm.com>
---
.../recipes-phosphor/obmc-phosphor-initfs/files/obmc-shutdown.sh | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
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 @@ do
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 @@ fi
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
--
2.7.1
More information about the openbmc
mailing list