rpi-clone
rpi-clone copied to clipboard
Use temporary directories for mounting
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.