From f3fff72f144046581b0c4948a1175606ff9f772e Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Mon, 14 Sep 2015 13:32:29 -0300 Subject: [PATCH] Preserve post_upgrade_command on /tmp on Full Update images, it's going to be used when upgrading from old systems --- tools/builder_common.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/builder_common.sh b/tools/builder_common.sh index cb81bb928b1..fe04bef7c0e 100644 --- a/tools/builder_common.sh +++ b/tools/builder_common.sh @@ -378,12 +378,17 @@ create_Full_update_tarball() { rm ${FINAL_CHROOT_DIR}/boot/loader.conf 2>/dev/null rm ${FINAL_CHROOT_DIR}/boot/loader.conf.local 2>/dev/null - # Old systems will run pre_upgrade_command from /tmp + # Old systems will run (pre|post)_upgrade_command from /tmp if [ -f ${FINAL_CHROOT_DIR}/usr/local/share/${PRODUCT_NAME}/pre_upgrade_command ]; then cp -p \ ${FINAL_CHROOT_DIR}/usr/local/share/${PRODUCT_NAME}/pre_upgrade_command \ ${FINAL_CHROOT_DIR}/tmp fi + if [ -f ${FINAL_CHROOT_DIR}/usr/local/share/${PRODUCT_NAME}/post_upgrade_command ]; then + cp -p \ + ${FINAL_CHROOT_DIR}/usr/local/share/${PRODUCT_NAME}/post_upgrade_command \ + ${FINAL_CHROOT_DIR}/tmp + fi echo ">>> Creating ${UPDATES_TARBALL_FILENAME} ..." | tee -a ${LOGFILE} tar --exclude=./dev -czPf ${UPDATES_TARBALL_FILENAME} -C ${FINAL_CHROOT_DIR} .