From 8c05fb072297583ea37154673e4473cffc2e7bd8 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Tue, 2 Jun 2020 11:13:05 -0700 Subject: [PATCH] storage: Remove rule to not automount system disks with no paritions This rule imported originally from udiskie's defaults seems somewhat arbitrary. We attach a SATA drive with partitions, it mounts them. However, if the entire drive is a file system, it does not auto-mount. Tests performed: - In VirtualBox, attach a SATA drive. Create two partitions and filesystems in them. Both filesystems are auto-mounted. - In VirtualBox, attach a SATA drive. Format the entire drive as a filesystem. The filesystem is auto-mounted. - Same behavior is observed with loop devices. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/storage/udisks2.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/plinth/modules/storage/udisks2.py b/plinth/modules/storage/udisks2.py index 70fd73eb4..a9448431d 100644 --- a/plinth/modules/storage/udisks2.py +++ b/plinth/modules/storage/udisks2.py @@ -254,16 +254,6 @@ def _consider_for_mounting(object_path): block_device.id, block_device.preferred_device) return - # Ignore non-external devices that don't have partition table (top-level - # filesystem). If the device is backed by a crypto device, still handle it. - # XXX: This rule is from udiskie. Should we keep it? - partition = Partition(object_path) - if block_device.hint_system and not partition.number and \ - block_device.crypto_backing_device == '/': - logger.info('Ignoring auto-mount of top-level internal device: %s %s', - block_device.id, block_device.preferred_device) - return - _mount(object_path)