mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 16:34:30 +01:00
Fix rclonefs script's eternal loop in case the remote is empty, by replacing ls with grep /proc/mounts. The space replacement in $mountpoint is necessary for the case where $mountpoint contains spaces
parent
0fb221b173
commit
38b6dc89a1
@ -39,11 +39,12 @@ To enable mounting a rclone volume using system mount tool, the following helper
|
|||||||
# NOTE: mount is suid and ignores pre-set PATHs -> specify explicitely
|
# NOTE: mount is suid and ignores pre-set PATHs -> specify explicitely
|
||||||
PATH=$PATH rclone mount $trans </dev/null >/dev/null 2>/dev/null &
|
PATH=$PATH rclone mount $trans </dev/null >/dev/null 2>/dev/null &
|
||||||
|
|
||||||
# WARNING: this will loop forever if remote is actually empty!
|
# wait until mounting is complete
|
||||||
until [ "`ls -l $mountpoint`" != 'total 0' ]; do
|
until grep -q " ${mountpoint// /\\\\040} " /proc/mounts; do
|
||||||
sleep 1
|
sleep 0.5
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
## fstab
|
## fstab
|
||||||
|
|
||||||
In `/etc/fstab` you can add something like:
|
In `/etc/fstab` you can add something like:
|
||||||
|
Loading…
Reference in New Issue
Block a user