:: Re: [DNG] automount Was: Re: A bett…
Forside
Slet denne besked
Besvar denne besked
Skribent: Steven W. Scott
Dato:  
Til: svante.signell
CC: dng
Emne: Re: [DNG] automount Was: Re: A better default windows manager
If you want a quick hack, I'm using a couple commands in a perl script
kicked off from inittab that works pretty well for listing attached media
with a recognizable filesystem on an appliance I'm working on - its meant
to provide a list of mountable drives but wouldn't take much to perform the
mount since it's running as root anyways.
Source:

#!/usr/bin/perl

while (sleep 10) {
`blkid -c /dev/null > /tmp/dvols.txt`;
`fdisk -l > /tmp/fdl.txt 2> /dev/null`;
}


the blkid gives a nice list of volumes and labels in dvols.txt, fdisk for
the partitions & filesystems.
for mounting everything needed is in the fdisk -l output - I just use the
blkid for presentation information and to exclude my appliance related
drives

Admittedly a crude approach, but it's worked fairly reliably for me.

By directing the output from the fdisk command to an array one could
easily run through the output and mount anything not already mounted.



SWS

On Wed, Aug 26, 2015 at 6:58 AM, Svante Signell <svante.signell@???>
wrote:

> On Tue, 2015-08-25 at 17:29 +0200, Joerg Reisenweber wrote:
> > On Sun 26 July 2015 23:18:58 Steve Litt wrote:
> > > You can roll your own automount with one day's work using inotify-wait,
> > > dmesg, sudo, lsblk, and the mount command. Works without X or window
> > > manager. Heck, I'll do it myself if more than 20 people want it.
> >
> > +1
> > /j
>
> Steve, what is the current development status of your promised tool?
>
> _______________________________________________
> Dng mailing list
> Dng@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
>