Skip to content

Commit df2d6c5

Browse files
committed
fixup! fix(rootfs-to-image): create NFS rootfs archive after hooks finalize the tree
1 parent f225b4c commit df2d6c5

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

lib/functions/image/rootfs-to-image.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,17 @@ function create_image_from_sdcard_rootfs() {
159159
$exclude_home \
160160
--info=progress0,stats1 "$SDCARD/" "${ROOTFS_EXPORT_DIR}/"
161161
fi
162-
fi
163162

164-
call_extension_method "post_create_rootfs_archive" <<- 'POST_CREATE_ROOTFS_ARCHIVE'
165-
*called after the rootfs archive / export tree is produced*
166-
Runs after pre_umount_final_image and after the archive step, so any
167-
path the archive step sets (e.g. ROOTFS_ARCHIVE_PATH) is populated.
168-
Use this instead of pre_umount_final_image when you need the final
169-
archive path — deploy hooks that ship the archive belong here.
170-
POST_CREATE_ROOTFS_ARCHIVE
163+
call_extension_method "post_create_rootfs_archive" <<- 'POST_CREATE_ROOTFS_ARCHIVE'
164+
*called after the rootfs archive / export tree is produced*
165+
Only fires for `ROOTFS_TYPE=nfs` and `ROOTFS_TYPE=nfs-root`, since
166+
other rootfs types do not produce a standalone archive. Runs after
167+
`pre_umount_final_image` and after the archive step, so any path
168+
the archive step sets (e.g. `ROOTFS_ARCHIVE_PATH`) is populated.
169+
Use this instead of `pre_umount_final_image` when you need the
170+
final archive path — deploy hooks that ship the archive belong here.
171+
POST_CREATE_ROOTFS_ARCHIVE
172+
fi
171173

172174
if [[ "${SHOW_DEBUG}" == "yes" ]]; then
173175
# Check the partition table after the uboot code has been written

0 commit comments

Comments
 (0)