Use temporary directories for mounting #102

Open
matthijskooijman wants to merge 3 commits from matthijskooijman/temp-mount-dir into master
matthijskooijman commented 2020-07-14 16:43:53 +02:00 (Migrated from github.com)

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.

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.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin matthijskooijman/temp-mount-dir:matthijskooijman/temp-mount-dir
git checkout matthijskooijman/temp-mount-dir
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Lerking/rpi-clone#102