meta-overlayfs: avoid moving skip-mount modules
This commit is contained in:
@@ -22,6 +22,22 @@ ensure_image_mounted() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Determine whether this module should be moved into the ext4 image.
|
||||
# We only relocate payloads that expose system/ overlays and do not opt out via skip_mount.
|
||||
module_requires_overlay_move() {
|
||||
if [ -f "$MODPATH/skip_mount" ]; then
|
||||
ui_print "- skip_mount flag detected; keeping files under /data/adb/modules"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ ! -d "$MODPATH/system" ]; then
|
||||
ui_print "- No system/ directory detected; keeping files under /data/adb/modules"
|
||||
return 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
# Post-installation: move partition directories to ext4 image
|
||||
post_install_to_image() {
|
||||
ui_print "- Moving module content to image"
|
||||
@@ -55,7 +71,11 @@ ensure_image_mounted
|
||||
# 2. Call standard install_module function (defined in installer.sh)
|
||||
install_module
|
||||
|
||||
# 3. Post-process: move content to image
|
||||
# 3. Post-process: move content to image when overlay data exists
|
||||
if module_requires_overlay_move; then
|
||||
post_install_to_image
|
||||
else
|
||||
ui_print "- Skipping move to modules image"
|
||||
fi
|
||||
|
||||
ui_print "- Installation complete"
|
||||
|
||||
Reference in New Issue
Block a user