init: Call update from initramfs directory
Use the copy in /run/initramfs/update to call update to be consistent
with other uses.
Signed-off-by: Milton Miller <miltonm@us.ibm.com>
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 @@
fsck=$fsckbase$rwfst
fsckopts=-a
optfile=/run/initramfs/init-options
+update=/run/initramfs/update
if test ! -f $optfile
then
@@ -143,20 +144,20 @@
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)