Auteur: Dr. Nikolaus Klepp Datum: Aan: dng Onderwerp: Re: [DNG] USB mount problem
Anno domini 2021 Wed, 23 Jun 13:34:39 +0200
Didier Kryn scripsit: > Le 23/06/2021 à 12:49, Dr. Nikolaus Klepp a écrit :
> > Anno domini 2021 Wed, 23 Jun 12:16:50 +0200
> > Didier Kryn scripsit:
> >> [...]
> >> There is no other way to know which partitions are mounted or not
> >> than read /proc/self/mounts. inotify does not work on pseudo-filesystems
> >> like /sys or /proc. Therefore, either this is done by the front-end or
> >> by the back-end.
> > Oh, inotifywatch perfectly works on /sys and /dev when you are root, in fact that's what I use as part of my automounter when I run fvwm:
>
> Of course it works on /dev; tmpfs and devtmpfs behave like real
> filesystems. This is what Hopman is based on (~:
>
> Hopman isn't root, doesn't need to be, and shouldn't be. And inotify
> doesn't work on /proc (at least for non-root).
Well, inotifywait does work on /dev /sys and /proc for non-root, too. At least it does here on chimaera. Just try these:
What does not work is /sys/block, but that's a cosmetic problem, as you alway can watch for /sys and fiilter the output.
How does hopman differ from e.g. "inotifywait -rm /dev/disk" or "inotifywait -rm /dev/block" + some lines of shell magic to get a nice output? If polling /proc/self/mounts is required, where is the point in not polling /sys/block/sd*/removable, too?
Nik
--
Please do not email me anything that you are not comfortable also sharing with the NSA, CIA ...