rclone/cmd
Ivan Andreev 8c10dee510 mountlib: use procfs to validate mount on linux - #5593
Current way of checking whether mountpoint has been already mounted (directory
list) can result in race if rclone runs under Automount (classic or systemd).

This patch adopts Linux ProcFS for the check. Note that mountpoint is considered
empty if it's tagged as "mounted" by autofs. Also ProcFS is used to check whether
rclone mount was successful (ie. tagged by a string containing "rclone").

On macOS/BSD where ProcFS is unavailable the old method is still used.

This patch also moves a few utility functions unchanged to utils.go:
CheckOverlap, CheckAllowings, SetVolumeName.
2021-10-02 23:45:16 +03:00
..
about Change byte unit format from MiByte to MiB 2021-08-31 09:57:27 +02:00
all cmd: add hashSUM file support (#5352) 2021-07-07 18:34:16 +03:00
authorize config: remove log.Fatal and replace with error passing where possible 2021-03-14 16:03:35 +00:00
backend fs: Add context to NewFs #3257 #4685 2020-11-09 18:05:54 +00:00
cachestats build: apply gofmt from golang 1.17 2021-09-09 20:43:59 +03:00
cat docs: fix markup of arguments #4276 2021-01-25 22:40:46 +03:00
check cmd: add hashSUM file support (#5352) 2021-07-07 18:34:16 +03:00
checksum cmd: add hashSUM file support (#5352) 2021-07-07 18:34:16 +03:00
cleanup docs: Add full stops for consistency in rclone --help 2020-09-08 16:26:09 +01:00
cmount build: apply gofmt from golang 1.17 2021-09-09 20:43:59 +03:00
config docs/config: remove use of backticks around words within a larger code block 2021-08-31 09:02:31 +02:00
copy lib/file: improve error message when attempting to create dir on nonexistent drive on windows 2021-10-01 23:18:39 +02:00
copyto docs: Removed ambiguity from copy command docs 2021-08-19 16:34:57 +01:00
copyurl docs: fixed some typos 2021-04-28 22:55:27 +01:00
cryptcheck check,cryptcheck: add reporting of filenames for same/missing/changed #3264 2020-07-21 22:08:13 +01:00
cryptdecode cryptdecode: fix formatting 2021-01-21 10:39:51 +00:00
dedupe docs: Updated sync and dedupe command docs #4429 2021-03-13 15:01:32 +00:00
delete Use binary prefixes for size and rate units 2021-04-27 02:25:52 +03:00
deletefile cmd: fix spelling of Definition 2019-10-14 17:02:09 +01:00
genautocomplete docs: spelling: e.g. 2020-10-28 18:16:23 +00:00
gendocs lib/file: improve error message when attempting to create dir on nonexistent drive on windows 2021-10-01 23:18:39 +02:00
hashsum cmd: add hashSUM file support (#5352) 2021-07-07 18:34:16 +03:00
link link: use "off" value for unset expiry 2021-04-07 13:58:37 +01:00
listremotes config: make config file system pluggable 2021-03-11 17:29:26 +00:00
ls docs: fix markup of arguments #4276 2021-01-25 22:40:46 +03:00
lsd fs: deglobalise the config #4685 2020-11-26 16:40:12 +00:00
lsf fs: Add context to NewFs #3257 #4685 2020-11-09 18:05:54 +00:00
lsjson lsjson: fix unterminated JSON in the presence of errors 2021-02-02 17:46:56 +00:00
lsl cmd: fix spelling of Definition 2019-10-14 17:02:09 +01:00
md5sum cmd: add hashSUM file support (#5352) 2021-07-07 18:34:16 +03:00
mkdir mkdir: warn when using mkdir on remotes which can't have empty directories 2020-07-08 17:55:58 +01:00
mount build: apply gofmt from golang 1.17 2021-09-09 20:43:59 +03:00
mount2 build: apply gofmt from golang 1.17 2021-09-09 20:43:59 +03:00
mountlib mountlib: use procfs to validate mount on linux - #5593 2021-10-02 23:45:16 +03:00
move docs: fix markup of arguments #4276 2021-01-25 22:40:46 +03:00
moveto docs: Removed ambiguity from copy command docs 2021-08-19 16:34:57 +01:00
ncdu build: apply gofmt from golang 1.17 2021-09-09 20:43:59 +03:00
obscure obscure: make rclone osbcure - ignore newline at end of line 2021-01-28 15:54:41 +00:00
purge docs: update documentation of commands delete,purge,rmdir,rmdirs 2020-11-23 17:10:08 +00:00
rc rc: factor async/sync job handing into rc/jobs from rc/rcserver 2021-02-07 14:56:41 +00:00
rcat rcat: add --size flag for more efficient uploads of known size - fixes #4403 2021-04-13 12:25:47 +01:00
rcd rcd: Added systemd notification during the 'rclone rcd' command call. This also fixes #5073. 2021-03-11 17:12:14 +00:00
reveal cmd: fix spelling of Definition 2019-10-14 17:02:09 +01:00
rmdir docs: update documentation of commands delete,purge,rmdir,rmdirs 2020-11-23 17:10:08 +00:00
rmdirs docs: update documentation of commands delete,purge,rmdir,rmdirs 2020-11-23 17:10:08 +00:00
selfupdate lib/file: improve error message when attempting to create dir on nonexistent drive on windows 2021-10-01 23:18:39 +02:00
serve lib/file: improve error message when attempting to create dir on nonexistent drive on windows 2021-10-01 23:18:39 +02:00
settier cmd: fix spelling of Definition 2019-10-14 17:02:09 +01:00
sha1sum cmd: add hashSUM file support (#5352) 2021-07-07 18:34:16 +03:00
size size: include human-readable count 2021-08-31 09:57:27 +02:00
sync docs: Removed ambiguity from copy command docs 2021-08-19 16:34:57 +01:00
test lib/file: improve error message when attempting to create dir on nonexistent drive on windows 2021-10-01 23:18:39 +02:00
touch docs: spelling: e.g. 2020-10-28 18:16:23 +00:00
tree tree: option to print human-readable sizes removed in favor of global option 2021-08-31 09:57:27 +02:00
version config: fix issues with memory-only config file paths 2021-04-12 18:17:19 +02:00
cmd.go cmd: Move exit status codes to separate package 2021-07-07 17:59:26 +01:00
help.go fs: deglobalise the config #4685 2020-11-26 16:40:12 +00:00
progress.go Add a download flag to hashsum and related commands to force rclone to download and hash files locally 2020-12-27 15:40:44 +00:00
selfupdate_disabled.go build: apply gofmt from golang 1.17 2021-09-09 20:43:59 +03:00
selfupdate_enabled.go build: apply gofmt from golang 1.17 2021-09-09 20:43:59 +03:00
siginfo_darwin.go build: apply gofmt from golang 1.17 2021-09-09 20:43:59 +03:00
siginfo_others.go build: apply gofmt from golang 1.17 2021-09-09 20:43:59 +03:00