diff options
author | Milton D. Miller II <miltonm@us.ibm.com> | 2016-02-28 18:06:46 -0600 |
---|---|---|
committer | Milton D. Miller II <miltonm@us.ibm.com> | 2016-03-03 14:37:13 -0600 |
commit | 042e237165a43bc519b725a2c5158c42e2c312b4 (patch) | |
tree | 865bd3dd8e1b92bf610dba40ad91d362a53ecad7 | |
parent | 35b92042e297eda3628a41ebb74fe96e10ac637e (diff) | |
download | talos-openbmc-042e237165a43bc519b725a2c5158c42e2c312b4.tar.gz talos-openbmc-042e237165a43bc519b725a2c5158c42e2c312b4.zip |
shutdown: Complain if update images exist without update script
Complain if the update program is missing if flash update images
are present. This is similar to the message in root and will
inform a serial console reader why the update images are not
being applied.
The update script is copied from the initramfs to the run tmpfs
ram file system. It is built and packaged with the init and
shutdown script. It would have been removed, unpackaged, or
init changed for unknown reasons by root or the build system
for this to occur.
Signed-off-by: Milton Miller <miltonm@us.ibm.com>
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-shutdown.sh | 9 |
1 files changed, 7 insertions, 2 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 99a743222..bae572b71 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 @@ -37,9 +37,14 @@ then ln -sn /run/fw_env ${image}u-boot-env fi -if test -x /update && ls $image* > /dev/null 2>&1 +if ls $image* > /dev/null 2>&1 then - /update ${1+"$@"} + if test -x /update + then + /update + else + echo 1>&2 "Flash update requested but /update program missing!" + fi fi echo Remaining mounts: |