-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
It'd be great to be able to specify allowed/disabled actions performed at devices via the config's device_config section in a similar fashion ignore, automount, or options are.
The reason behind this request is e.g. Lenovo T480-series laptop which includes an internal SD/MMC reader which shows itself as the /dev/sda device and mounts inserted cards as /dev/sda1.
Udiskie correctly automounts a SD card on insert and allows unmounting it properly. However, it also allows ejecting the reader itself aka the /dev/sda device.
This is rather unfortunate since a single misclick disconnects/disables the whole SD/MMC reader...
Can this situation be remedied by e.g. an udev rule or is this really needed to be dealt with by udiskie?
udisksctl dump
...
/org/freedesktop/UDisks2/drives/Generic__SD_2fMMC_20120501030900000:
org.freedesktop.UDisks2.Drive:
CanPowerOff: false
Configuration: {}
ConnectionBus: usb
Ejectable: true
Id: Generic--SD-MMC-20120501030900000
Media:
MediaAvailable: true
MediaChangeDetected: true
MediaCompatibility:
MediaRemovable: true
Model: SD/MMC
Optical: false
OpticalBlank: false
OpticalNumAudioTracks: 0
OpticalNumDataTracks: 0
OpticalNumSessions: 0
OpticalNumTracks: 0
Removable: true
Revision: 1.00
RotationRate: -1
Seat: seat0
Serial: 20120501030900000
SiblingId: /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:1.0
Size: 31914983424
SortKey: 00coldplug/12removable/sd____a
TimeDetected: 1737095904635184
TimeMediaDetected: 1737095926436244
Vendor: Generic-
WWN:
...
/org/freedesktop/UDisks2/block_devices/sda:
org.freedesktop.UDisks2.Block:
Configuration: []
CryptoBackingDevice: '/'
Device: /dev/sda
DeviceNumber: 2048
Drive: '/org/freedesktop/UDisks2/drives/Generic__SD_2fMMC_20120501030900000'
HintAuto: true
HintIconName:
HintIgnore: false
HintName:
HintPartitionable: true
HintSymbolicIconName:
HintSystem: false
Id:
IdLabel:
IdType:
IdUUID:
IdUsage:
IdVersion:
MDRaid: '/'
MDRaidMember: '/'
PreferredDevice: /dev/sda
ReadOnly: false
Size: 31914983424
Symlinks: /dev/disk/by-diskseq/15
/dev/disk/by-id/usb-Generic-_SD_MMC_20120501030900000-0:0
/dev/disk/by-path/pci-0000:00:14.0-usb-0:3:1.0-scsi-0:0:0:0
/dev/disk/by-path/pci-0000:00:14.0-usbv3-0:3:1.0-scsi-0:0:0:0
UserspaceMountOptions:
org.freedesktop.UDisks2.PartitionTable:
Partitions: /org/freedesktop/UDisks2/block_devices/sda1
Type: dosMetadata
Metadata
Assignees
Labels
No labels