I need to have udev mount a USB device that has raw data, which appears like /dev/sdc, but in the same time if another stick has partitions I only need to have folders mounted only for those partitions.I have attempted with a udev rules like:ACTION==add, ENV{myBusID}!=, ENV{myDevID}!=, ENV{myPartition}!=, ENV{dir_name}=usb-%k-%E{myBusID}-%E{myDevID}-%E{myPartition}, GOTO=skip_device#Set mount directory for partitionaless sticksSUBSYSTEM==block, ACTION==add,  ENV{myBusID}!=, ENV{myDevID}!=, ENV{myPartition}==,  ENV{dir_name}=usb-%k-%E{myBusID}-%E{myDevID}--%E{myPartition}#LabelLABEL=skip_deviceHowever, with the above example I will have a folder created for the device too if the USB stick has partitions.A use-case would be buying a brand new USB stick, stick it in a Windows device, format it VFAT and then insert it in the Linux system.Mentions:I cannot use udisks or other similar software, I'm quite bound to have this running by using udev rules.
Mount USB stick without partitions using udev rules
linux;udev
Try this:# Set mount directory for partition-less sticksSUBSYSTEM==block, ACTION==add, ENV{myBusID}!=, ENV{myDevID}!=, ENV{myPartition}==, ENV{ID_PART_TABLE_TYPE}==, ENV{dir_name}=usb-%k-%E{myBusID}-%E{myDevID}--%E{myPartition}