rpi-clone icon indicating copy to clipboard operation
rpi-clone copied to clipboard

Use temporary directories for mounting

Open matthijskooijman opened this issue 4 years ago • 0 comments

This creates a temporary directory for src and dst mounts, rather than hardcoding /mnt/clone and /mnt/clone-src. This allows running the script twice in parallel, without conflicts.

To prevent littering tons of directories around, automatic cleanup of these directories is added (which has the added advantage of also unmounting and cleaning up when the script is somehow interrupted or fails in an unexpected way).

This also changes the interface to the rpi-clone-setup script slightly, since that also used to hardcode this directory name.

See commit messages for some more details.

matthijskooijman avatar Jul 14 '20 14:07 matthijskooijman