From 7c3a3fe5ab6bf428f0ba42d77181d1951480f3d1 Mon Sep 17 00:00:00 2001 From: Jianxun Zhang Date: Wed, 3 Aug 2016 11:04:19 -0700 Subject: rmc: Add support for POSTINSTALL.sh post-installation hook POSTINSTALL.sh provides developer a final chance to retouch almost anything deployed on target before unmounting partitions and reboot at the end of an installation session. RMC installer executes this script if it can be queried from RMC database file for the running board. Some steps to make system bootable still happen after this hook. Signed-off-by: Jianxun Zhang Reviewed-by: Saul Wold Signed-off-by: Tom Zanussi --- common/recipes-core/initrdscripts/files/init-install-efi.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/recipes-core/initrdscripts/files/init-install-efi.sh b/common/recipes-core/initrdscripts/files/init-install-efi.sh index e12a9d21..0b2ee46b 100644 --- a/common/recipes-core/initrdscripts/files/init-install-efi.sh +++ b/common/recipes-core/initrdscripts/files/init-install-efi.sh @@ -267,6 +267,14 @@ if [ -f "${RMC_DB}" ] && [ -f "${RMC_CMD}" ]; then else echo "INSTALLER.CONFIG is not found, skip RMC deployment" fi + + # Final retouching by calling post-install hook + if ${RMC_CMD} -B POSTINSTALL.sh -d "${RMC_DB}" -o /tmp/POSTINSTALL.sh; then + echo "Found POSTINSTALL.sh execute it..." + chmod 500 /tmp/POSTINSTALL.sh + /tmp/POSTINSTALL.sh + rm -rf /tmp/POSTINSTALL.sh + fi fi set -e -- cgit v1.2.3-54-g00ecf