[PATCH openbmc v2 27/34] init: Call update from initramfs directory
OpenBMC Patches
openbmc-patches at stwcx.xyz
Tue Mar 8 08:30:16 AEDT 2016
From: "Milton D. Miller II" <miltonm at us.ibm.com>
Use the copy in /run/initramfs/update to call update to be consistent
with other uses.
Signed-off-by: Milton Miller <miltonm at us.ibm.com>
---
.../recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh
index 469beaf..b4d1569 100644
--- a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh
+++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh
@@ -102,6 +102,7 @@ fsckbase=/sbin/fsck.
fsck=$fsckbase$rwfst
fsckopts=-a
optfile=/run/initramfs/init-options
+update=/run/initramfs/update
if test ! -f $optfile
then
@@ -143,20 +144,20 @@ fi
if ls $image* > /dev/null 2>&1
then
- if ! test -x /update
+ if ! test -x $update
then
- debug_takeover "Flash update requested but /update missing!"
+ debug_takeover "Flash update requested but $update missing!"
elif test -f $trigger -a ! -s $trigger
then
echo "Saving selected files from read-write overlay filesystem."
- /update --no-restore-files
+ $update --no-restore-files
echo "Clearing read-write overlay filesystem."
flash_eraseall /dev/$rwfs
echo "Restoring saved files to read-write overlay filesystem."
touch $trigger
- /update --no-save-files --clean-saved-files
+ $update --no-save-files --clean-saved-files
else
- /update --clean-saved-files
+ $update --clean-saved-files
fi
rwfst=$(probe_fs_type $rwdev)
--
2.7.1
More information about the openbmc
mailing list