Browse Source

Add support for overlay hooks

Changelog: Title
Signed-off-by: Alin Alexandru <alin.alexandru@innobyte.com>
2.3.x
Alin Alexandru 4 years ago
parent
commit
5bb68687b4
No known key found for this signature in database GPG Key ID: AE49D5F0F92C5CE
  1. 11
      mender-convert-modify

11
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

Loading…
Cancel
Save