:: [DNG] Preferred automounter behavio…
Pàgina inicial
Delete this message
Reply to this message
Autor: Steve Litt
Data:  
A: dng
Assumpte: [DNG] Preferred automounter behavior?
Hi all,

While creating a sample program for an upcoming Python presentation for
GoLUG, I created about 2/3 of an automounter program (no GUI, file
manager or special program needed). It looks like it will end up being
a 100 to 200 line Python program whose stdin is provided by the output
of inotifywait -mr /dev.

The way it would work is it runs as a daemon (trivial to do if you use
daemontools, daemontools-encore, etc). Upon physical insertion of a
thumb drive, it would mount all mountable partitions of the thumb
drive. With a few modifications, it could probably work for DVD drives
and USB hard disks too, but that's for later --- I'm now concerned with
thumb drives.

Anyway, if I stick in a thumb drive that contains partitions /dev/sdd1
and /dev/sdd2, would the most convenient way for it to automount
be /mnt/sdd1 and /mnt/sdd2, or would it be more convenient by the ID so
it might look like /mnt/usb-Generic_Flash_Disk_0FEAEC2F-0:0-part1
and /mnt/usb-Generic_Flash_Disk_0FEAEC2F-0:0-part2?

Please remember this automounter is intended to be useable without a
file manager, so going really deep with the /mnt hierarchy wouldn't be
an advantage.

By the way, this automounter wouldn't be specific to Devuan: It would
probably work with any non-systemd system, and would likely to work
with anything with a Linux kernel, Python, and inotifywait.

Thanks,

SteveT

Steve Litt 
November 2015 featured book: Troubleshooting Techniques
     of the Successful Technologist
http://www.troubleshooters.com/techniques