From 5bb68687b440072989dc113e25c9b30c9263855a Mon Sep 17 00:00:00 2001 From: Alin Alexandru Date: Sat, 3 Oct 2020 11:11:33 +0300 Subject: [PATCH] Add support for overlay hooks Changelog: Title Signed-off-by: Alin Alexandru --- mender-convert-modify | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mender-convert-modify b/mender-convert-modify index b70d21a..7bc4c55 100755 --- a/mender-convert-modify +++ b/mender-convert-modify @@ -26,6 +26,11 @@ function user_local_modify() { } USER_LOCAL_MODIFY_HOOKS=(user_local_modify) +function overlay_modify() { + true +} +OVERLAY_MODIFY_HOOKS=(overlay_modify) + function trap_exit() { echo "mender-convert-modify has finished. Cleaning up..." sudo umount -f work/boot @@ -311,3 +316,9 @@ for overlay in "${overlays[@]}"; do log_info "Applying rootfs overlay: ${overlay}" run_and_log_cmd "sudo rsync --archive --keep-dirlinks --verbose ${overlay}/ work/rootfs/" done + +log_info "Performing overlay specific modifications (if any)" +for hook in "${OVERLAY_MODIFY_HOOKS[@]}"; do + log_info "Running hook: $hook" + eval $hook +done