mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
armbian-next: add (trap) cleanup handler to reset ./tmp and ./output to original pre-sudo UID before exiting, even with failure/abort
This commit is contained in:
@@ -121,7 +121,6 @@ create_image_from_sdcard_rootfs() {
|
||||
[[ -n $compression_type ]] && run_host_command_logged rm -v "${DESTIMG}/${version}.img"
|
||||
run_host_command_logged rsync -av --no-owner --no-group --remove-source-files "${DESTIMG}/${version}"* "${FINALDEST}"
|
||||
run_host_command_logged rm -rfv --one-file-system "${DESTIMG}"
|
||||
reset_uid_owner "${FINALDEST}" # Fix owner of files in the final destination
|
||||
|
||||
# write image to SD card
|
||||
write_image_to_device "${FINALDEST}/${version}.img" "${CARD_DEVICE}"
|
||||
|
||||
Reference in New Issue
Block a user