Skip to content

Commit

Permalink
Preserve post_upgrade_command on /tmp on Full Update images, it's goi…
Browse files Browse the repository at this point in the history
…ng to be used when upgrading from old systems
  • Loading branch information
rbgarga committed Sep 14, 2015
1 parent 7266685 commit f3fff72
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/builder_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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} .
Expand Down

0 comments on commit f3fff72

Please sign in to comment.