summaryrefslogtreecommitdiffstats
path: root/meta-phosphor
diff options
context:
space:
mode:
authorMilton Miller <miltonm@us.ibm.com>2016-02-05 13:56:18 -0600
committerMilton D. Miller II <miltonm@us.ibm.com>2016-02-09 11:11:23 -0600
commitdbacf104885c3bf78c5f3e06f63bba6db0742e4b (patch)
tree240a67271e4beaf244e3cb05fcf1185ba295abd9 /meta-phosphor
parent5c212e4cf5d62336d9b6e52b4fbeda647c57325f (diff)
downloadtalos-openbmc-dbacf104885c3bf78c5f3e06f63bba6db0742e4b.tar.gz
talos-openbmc-dbacf104885c3bf78c5f3e06f63bba6db0742e4b.zip
obmc-initfs: run update as a sub-script
The update script has replicated logic to do the final reboot, kexec, halt, or poweroff command. Instead of transferring control via exec just call it as a normal command, and return to shutdown for the final mounted fs debug print and command. Signed-off-by: Milton Miller <miltonm@us.ibm.com>
Diffstat (limited to 'meta-phosphor')
-rw-r--r--meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-shutdown.sh3
-rwxr-xr-xmeta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh15
2 files changed, 5 insertions, 13 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 d530265cd..7d1157a05 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
@@ -34,7 +34,7 @@ fi
if test -x /update && ls $image* > /dev/null 2>&1
then
- exec /update ${1+"$@"}
+ /update ${1+"$@"}
fi
echo Remaining mounts:
@@ -43,7 +43,6 @@ cat /proc/mounts
test "umount_proc" && umount /proc && rmdir /proc
-
# Execute the command systemd told us to ...
if test -d /oldroot && test "$1"
then
diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh
index 32e83e680..face06d1d 100755
--- a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh
+++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh
@@ -92,19 +92,12 @@ then
umount $rwdir
fi
-# Execute the command systemd told us to ...
-if test -d /oldroot && test -x "/sbin/$1" && test -f "/sbin/$1"
-then
- if test "$1" == kexec
- then
- /sbin/$1 -f -e
- else
- /sbin/$1 -f
- fi
-fi
+exit
+# NOT REACHED without edit
+# NOT REACHED without edit
-echo "Execute ${1-reboot} -f if all is ok"
+echo "Flash completed. Inspect, cleanup and reboot -f to continue."
export PS1=update-sh#\
exec /bin/sh
OpenPOWER on IntegriCloud