Thanks Ian, Greg, Todd and Jeff for yout rime and suggestion.

I confirm that the script is

#!/bin/sh
if ntfs-3g.probe /dev/sda1; then
       echo "-fstype=ntfs-3g,other-opts :/dev/sda1"
else
       echo "-fstype=vfat,other-opts :/dev/sda1"
fi

On stdout we have to put the string "-fstype=fs,opts :/dev/XXX".

I have tried to use "fdisk -l" to identify the partition type.
This is an other way, but the program ntfs-3g is a better choice.

I don't have udev and hotplug.
Personally I don't like that stuff because it is complex.
In my opinion automount is perfect for my use.

In my opiniuon would be interesting if it was possible implement for
example a thing like "-fstype fs1,opts1;fs2,opts2;...,fsn,optsn" or
"-fstype fs1,opts1 -fstype fs2,opts2;...,-fstype fsn,optsn" in a file map.

This way don't need of a check program and would be more generic.

Thanks again to Ian, Greg, Todd and Jeff.
I liked to implement this in the right way, not in a dirty way. Now I
have the right idea.

Bye,
Paolo

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs

Reply via email to