Commit 8cece8b8 authored by Daniel Watkins's avatar Daniel Watkins

Handle symlink mount points in mount_cb.

The Azure data source now uses a /dev/disk symlink to identify devices,
but the dereferenced version of this appears in the mount table.
mount_cb therefore doesn't identify when a disk is already mounted, and
attempts to mount it a second time (which fails with NTFS).
parent 60a9ebab
......@@ -1480,8 +1480,8 @@ def mount_cb(device, callback, data=None, rw=False, mtype=None, sync=True):
mounted = mounts()
with tempdir() as tmpd:
umount = False
if device in mounted:
mountpoint = mounted[device]['mountpoint']
if os.path.realpath(device) in mounted:
mountpoint = mounted[os.path.realpath(device)]['mountpoint']
failure_reason = None
for mtype in mtypes:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment