Hi,
On 11/6/21 23:04, Steve Litt wrote:
> As I remember, Aitor created a really nice flash drive mounter. Does
> anyone remember it?
Thanks, Steve, it's named Hopman. A project started by Didier Kryn. At
the beginning my point of view was quite different
because, on the contrary than Didier's design, i didn't use inotify to
become aware of any kernel uevent. The reason why
i avoided inotify was related to some missing symlinks in /dev/disk when
using vdev as device manager (hopman will be
compatible with both eudev and vdev, and i wanted to use this directory
as one of the wathdirs for inotify). Now i'm
considering as a possible better approach to create vdev actions for
each (ADD|REMOVE|CHANGE) device events, and their equivalent
udev rules for eudev to trigger them in a way that hopman only will be
notified about changes in the /proc/mounts file
whenever the user uses pmount or any similar tool -via the gui of
hopman- to mount/unmount partitions.
Turning to the issues with the symlinks in /dev/disk/by-label,
/dev/disk/by-path, etc... the problem was that all the
links were created statically during the boot process, that is, when
/sbin/vdevd was started. However, after the removal
of the mouse or the keyboard, say, the missing symlinks in
/dev/input/by-path, etc... didn't reappear once they were plugged in again.
I was wondering whether or not this was intended, but clearly Jude
Nelson designed vdev to work dynamically.
After several testings, finally i found the origin of this erratic
behaviour in the line 1664 of:
https://github.com/jcnelson/vdev/blob/master/vdevd/action.c
<
https://github.com/jcnelson/vdev/blob/master/vdevd/action.c>
I tried commenting this line and now symlinks appear/disappear in a
dynamic way. Let's say in passing that i didn't find any unwanted
colateral effect so far.
I think these are great news considering, on the other hand, that the
boot time has been reduced to ~20 seconds (in a modern computer), which
is quite acceptable.
To end, I'm following this thread, and i had in mind to talk about
hopman here. But i've been busy during these days...
I'll let you know :)
Cheers,
Aitor.