mount: add --devname to set the device name sent to FUSE for mount display
Before this change, the device name was always the remote:path rclone was configured with. However this can contain sensitive information and it appears in the `mount` output, so `--devname` allows the user to configure it. See: https://forum.rclone.org/t/rclone-mount-blomp-problem/29151/11
This commit is contained in:
parent
9cc50a614b
commit
f4c40bf79d
5 changed files with 18 additions and 8 deletions
|
@ -87,7 +87,7 @@ func (m *MountPoint) CheckAllowings() error {
|
|||
// SetVolumeName with sensible default
|
||||
func (m *MountPoint) SetVolumeName(vol string) {
|
||||
if vol == "" {
|
||||
vol = m.Fs.Name() + ":" + m.Fs.Root()
|
||||
vol = fs.ConfigString(m.Fs)
|
||||
}
|
||||
m.MountOpt.SetVolumeName(vol)
|
||||
}
|
||||
|
@ -102,3 +102,11 @@ func (o *Options) SetVolumeName(vol string) {
|
|||
}
|
||||
o.VolumeName = vol
|
||||
}
|
||||
|
||||
// SetDeviceName with sensible default
|
||||
func (m *MountPoint) SetDeviceName(dev string) {
|
||||
if dev == "" {
|
||||
dev = fs.ConfigString(m.Fs)
|
||||
}
|
||||
m.MountOpt.DeviceName = dev
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue