David, feel free to stop discussion if you find me annoying. My problem
in some sense is close to your one and I am trying to figure out if
missed some udisks feature and the result is some inconvenience.
On 19/02/2024 11:26, David Wright wrote:
On Sun 18 Feb 2024 at 12:41:29 (+0700), Max Nikulin wrote:
On 18/02/2024 11:40, David Wright wrote:
$ udisksctl unlock --block-device /dev/disk/by-partlabel/Nokia01
When sudo is
involved, I still do not see any advantage of udisk[s]ctl over
"cryptsetup open".
I'd be more worried about disadvantages. About the only difference
I see is that cryptsetup open requires a name.
I find it convenient to have a meaningful name in /dev/mapper in
addition to /dev/dm-X. So I would not call it pure disadvantage.
As third option, if I remember it correctly, pmount
That would be pointless for me. After udev creates correctly-named
mountpoints using my rules, entries in fstab set the appropriate
flags for each individual device. That contradicts the expressed main
purpose of pmount: "permits normal users to mount removable devices
without a matching /etc/fstab entry." — precisely what I don't want.
I consider pmount as a tool does not need separate unlock and mount
commands, so a shell function becomes unnecessary. In respect to
permissions (for removable drives) it acts as a substitute for sudo.
I expected that you need to mount a partition under /media into the
directory with name taken from filesystem LABEL. If so then udisksd can
do it and /etc/fstab entry is unnecessary. You anyway added an udev
rule. The following one should change mountpoint from
/media/$USER/lulu01 to /media/lulu01
SUBSYSTEM=="block", ENV{ID_FS_LABEL}=="lulu01",
ENV{UDISKS_FILESYSTEM_SHARED}="1"
It seems that mixing of udisksctl and non-udisksctl commands cat be avoided.