:: Re: [DNG] USB mount problem
Top Page
Delete this message
Reply to this message
Author: Dr. Nikolaus Klepp
Date:  
To: dng
Subject: Re: [DNG] USB mount problem
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:

# # inotifywait -rm /sys/
Setting up watches. Beware: since -r was given, this may take a while!
Watches established.
/sys/class/ OPEN,ISDIR power_supply
/sys/class/power_supply/ OPEN,ISDIR
/sys/class/ ACCESS,ISDIR power_supply
/sys/class/power_supply/ ACCESS,ISDIR
/sys/class/ ACCESS,ISDIR power_supply
/sys/class/power_supply/ ACCESS,ISDIR
/sys/class/ CLOSE_NOWRITE,CLOSE,ISDIR power_supply
/sys/class/power_supply/ CLOSE_NOWRITE,CLOSE,ISDIR
/sys/devices/system/cpu/cpufreq/policy0/ OPEN scaling_cur_freq
/sys/devices/system/cpu/cpufreq/policy0/ ACCESS scaling_cur_freq
/sys/devices/system/cpu/cpufreq/policy0/ CLOSE_NOWRITE,CLOSE scaling_cur_freq
/sys/class/ OPEN,ISDIR power_supply
/sys/class/power_supply/ OPEN,ISDIR
...

# inotifywait -rm /dev/char/
Setting up watches. Beware: since -r was given, this may take a while!
Watches established.
/dev/char/ CREATE 189:135
/dev/char/ CREATE 188:0
/dev/char/ ATTRIB 189:135
...

# inotifywait -rm /dev/block
Setting up watches. Beware: since -r was given, this may take a while!
Watches established.
/dev/block/ CREATE 8:16
/dev/block/ CREATE 8:18
/dev/block/ CREATE 8:17
/dev/block/ ATTRIB 8:17
...

Nik



>
>
> >
> >>     Both Hopman-cli and the GUI must read hopmanrc at startup (it seems
> >> simpler to have a single file to configure both). Possibly the name of
> >> the GUI application might be specified in hopmanrc and Hopman-cli would
> >> launch it.
> > What's configurable in hopmanrc? Shouldn't it "just work" for all partitions/devices? The GUI part most likely will need some config, e.g automounting certain devices/partitions etc.
>
>     hopmanrc provides a lot of possiblities to parameterise the
> application, such as window appearance, behaviour and position, location
> of pid-file and helper applications to mount/umount/open/eject
> partitions/devices.
>
> --     Didier
>
>
>
>
> _______________________________________________
> Dng mailing list
> Dng@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
>




--
Please do not email me anything that you are not comfortable also sharing with the NSA, CIA ...