diff options
author | Milton Miller <miltonm@us.ibm.com> | 2016-02-05 11:06:39 -0600 |
---|---|---|
committer | Milton D. Miller II <miltonm@us.ibm.com> | 2016-02-09 10:23:12 -0600 |
commit | 1c0dd48270552ed14bd9867957044fdbb78fd7ca (patch) | |
tree | 8891814e3fe48120767b30f1b97987a9d23a2a2f /meta-phosphor/common/recipes-phosphor | |
parent | 04836b5ae659c2ad7b558787b670c336bea22a5d (diff) | |
download | talos-openbmc-1c0dd48270552ed14bd9867957044fdbb78fd7ca.tar.gz talos-openbmc-1c0dd48270552ed14bd9867957044fdbb78fd7ca.zip |
obmc-initfs: shutdown: use absolute paths
In shutdown, cd to / like init and update, but do not switch
paths to assume this. Instead switch a few more paths to be
absolute. This will clarify the expcted execution environment
and the location of files being tested. It also provides
consistency when calling /update and creating and testing
the /image- symlinks.
Signed-off-by: Milton Miller <miltonm@us.ibm.com>
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor')
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-shutdown.sh | 5 |
1 files changed, 3 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 d29db265d..c550e06ad 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 @@ -5,10 +5,11 @@ echo shutdown: "$@" export PS1=shutdown-sh#\ # exec bin/sh +cd / if [ ! -e /proc/mounts ] then mkdir -p /proc - mount proc proc -tproc + mount proc /proc -tproc umount_proc=1 else umount_proc= @@ -30,7 +31,7 @@ then ln -sn /run/fw_env /image-u-boot-env fi -if test -x /update && ls image-* > /dev/null 2>&1 +if test -x /update && ls /image-* > /dev/null 2>&1 then exec /update ${1+"$@"} fi |