mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
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 <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
d4ce843e22
commit
8c05fb0722
@ -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)
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user