Browse Source

Merge pull request #238 from alinalexandru/feature/overlay-hooks

Add support for overlay hooks
2.3.x
Kristian Amlie 4 years ago
committed by GitHub
parent
commit
24463c5edb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  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
@ -314,3 +319,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