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
No known key found for this signature in database
GPG Key ID: AE49D5F0F92C5CE
1 changed files with
11 additions and
0 deletions
-
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 |
|
|
|